File tree 2 files changed +4
-11
lines changed
unittests/SourceKit/SwiftLang
2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 16
16
#include " SourceKit/Core/NotificationCenter.h"
17
17
#include " SourceKit/Support/Concurrency.h"
18
18
#include " SourceKit/SwiftLang/Factory.h"
19
+ #include " swift/Basic/LLVMInitialize.h"
19
20
#include " llvm/Support/MemoryBuffer.h"
20
21
#include " llvm/Support/Path.h"
21
22
#include " llvm/Support/TargetSelect.h"
@@ -63,10 +64,6 @@ class CursorInfoTest : public ::testing::Test {
63
64
LangSupport &getLang () { return getContext ().getSwiftLangSupport (); }
64
65
65
66
void SetUp () override {
66
- llvm::InitializeAllTargets ();
67
- llvm::InitializeAllTargetMCs ();
68
- llvm::InitializeAllAsmPrinters ();
69
- llvm::InitializeAllAsmParsers ();
70
67
NumTasks = 0 ;
71
68
}
72
69
@@ -76,6 +73,7 @@ class CursorInfoTest : public ::testing::Test {
76
73
/* diagnosticDocumentationPath*/ "",
77
74
SourceKit::createSwiftLangSupport,
78
75
/* dispatchOnMain=*/ false)) {
76
+ INITIALIZE_LLVM ();
79
77
// This is avoiding destroying \p SourceKit::Context because another
80
78
// thread may be active trying to use it to post notifications.
81
79
// FIXME: Use shared_ptr ownership to avoid such issues.
Original file line number Diff line number Diff line change 15
15
#include " SourceKit/Core/NotificationCenter.h"
16
16
#include " SourceKit/Support/Concurrency.h"
17
17
#include " SourceKit/SwiftLang/Factory.h"
18
+ #include " swift/Basic/LLVMInitialize.h"
18
19
#include " llvm/Support/MemoryBuffer.h"
19
20
#include " llvm/Support/Path.h"
20
21
#include " llvm/Support/TargetSelect.h"
@@ -121,6 +122,7 @@ class EditTest : public ::testing::Test {
121
122
122
123
public:
123
124
EditTest () {
125
+ INITIALIZE_LLVM ();
124
126
// This is avoiding destroying \p SourceKit::Context because another
125
127
// thread may be active trying to use it to post notifications.
126
128
// FIXME: Use shared_ptr ownership to avoid such issues.
@@ -141,13 +143,6 @@ class EditTest : public ::testing::Test {
141
143
142
144
LangSupport &getLang () { return Ctx->getSwiftLangSupport (); }
143
145
144
- void SetUp () override {
145
- llvm::InitializeAllTargets ();
146
- llvm::InitializeAllTargetMCs ();
147
- llvm::InitializeAllAsmPrinters ();
148
- llvm::InitializeAllAsmParsers ();
149
- }
150
-
151
146
void addNotificationReceiver (DocumentUpdateNotificationReceiver Receiver) {
152
147
Ctx->getNotificationCenter ()->addDocumentUpdateNotificationReceiver (Receiver);
153
148
}
You can’t perform that action at this time.
0 commit comments