File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 15
15
// ===----------------------------------------------------------------------===//
16
16
17
17
#include " swift/Basic/LLVMInitialize.h"
18
+ #include " swift/Basic/InitializeSwiftModules.h"
18
19
#include " swift/DependencyScan/DependencyScanImpl.h"
19
20
#include " swift/DependencyScan/DependencyScanningTool.h"
20
21
#include " swift/DependencyScan/StringUtils.h"
21
22
#include " swift/DriverTool/DriverTool.h"
22
23
#include " swift/Option/Options.h"
24
+ #include " swift/SIL/SILBridging.h"
23
25
24
26
using namespace swift ::dependencies;
25
27
@@ -129,7 +131,11 @@ void swiftscan_scanner_cache_reset(swiftscan_scanner_t scanner) {
129
131
// === Scanner Functions ---------------------------------------------------===//
130
132
131
133
swiftscan_scanner_t swiftscan_scanner_create (void ) {
134
+ static std::mutex initializationMutex;
135
+ std::lock_guard<std::mutex> lock (initializationMutex);
132
136
INITIALIZE_LLVM ();
137
+ if (!swiftModulesInitialized ())
138
+ initializeSwiftModules ();
133
139
return wrap (new DependencyScanningTool ());
134
140
}
135
141
You can’t perform that action at this time.
0 commit comments