19
19
#include " lldb/Initialization/SystemInitializerCommon.h"
20
20
#include " lldb/Interpreter/CommandInterpreter.h"
21
21
#include " lldb/Symbol/ClangASTContext.h"
22
- #include " lldb/Symbol/SwiftASTContext.h"
23
22
#include " lldb/Utility/Timer.h"
24
23
25
24
#include " Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h"
55
54
#include " Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.h"
56
55
#include " Plugins/InstrumentationRuntime/TSan/TSanRuntime.h"
57
56
#include " Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.h"
58
- #include " Plugins/InstrumentationRuntime/SwiftRuntimeReporting/SwiftRuntimeReporting.h"
59
57
#include " Plugins/JITLoader/GDB/JITLoaderGDB.h"
60
58
#include " Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
61
59
#include " Plugins/Language/ObjC/ObjCLanguage.h"
119
117
#include " lldb/Host/windows/windows.h"
120
118
#endif
121
119
122
- # if defined(__APPLE__) || defined(__linux__) || defined(_WIN32)
120
+ // BEGIN SWIFT
123
121
#include " Plugins/ExpressionParser/Swift/SwiftREPL.h"
122
+ #include " Plugins/InstrumentationRuntime/SwiftRuntimeReporting/SwiftRuntimeReporting.h"
124
123
#include " Plugins/Language/Swift/SwiftLanguage.h"
124
+ #include " lldb/Symbol/SwiftASTContext.h"
125
125
#include " lldb/Target/SwiftLanguageRuntime.h"
126
- # endif
126
+ // END SWIFT
127
127
128
128
#include " llvm/Support/TargetSelect.h"
129
129
@@ -140,6 +140,7 @@ SystemInitializerFull::SystemInitializerFull() {}
140
140
141
141
SystemInitializerFull::~SystemInitializerFull () {}
142
142
143
+ // BEGIN SWIFT
143
144
static void SwiftInitialize () {
144
145
#if defined(__APPLE__) || defined(__linux__) || defined(_WIN32)
145
146
SwiftLanguage::Initialize ();
@@ -155,6 +156,7 @@ static void SwiftTerminate() {
155
156
SwiftREPL::Terminate ();
156
157
#endif
157
158
}
159
+ // END SWIFT
158
160
159
161
#define LLDB_PROCESS_AArch64 (op ) \
160
162
ABIMacOSX_arm64::op (); \
@@ -231,7 +233,9 @@ llvm::Error SystemInitializerFull::Initialize() {
231
233
llvm::InitializeAllDisassemblers ();
232
234
233
235
ClangASTContext::Initialize ();
236
+ // BEGIN SWIFT
234
237
SwiftASTContext::Initialize ();
238
+ // END SWIFT
235
239
236
240
#define LLVM_TARGET (t ) LLDB_PROCESS_ ## t(Initialize)
237
241
#include " llvm/Config/Targets.def"
@@ -251,7 +255,9 @@ llvm::Error SystemInitializerFull::Initialize() {
251
255
ThreadSanitizerRuntime::Initialize ();
252
256
UndefinedBehaviorSanitizerRuntime::Initialize ();
253
257
MainThreadCheckerRuntime::Initialize ();
258
+ // BEGIN SWIFT
254
259
SwiftRuntimeReporting::Initialize ();
260
+ // END SWIFT
255
261
256
262
SymbolVendorELF::Initialize ();
257
263
breakpad::SymbolFileBreakpad::Initialize ();
@@ -277,7 +283,9 @@ llvm::Error SystemInitializerFull::Initialize() {
277
283
CPlusPlusLanguage::Initialize ();
278
284
ObjCLanguage::Initialize ();
279
285
ObjCPlusPlusLanguage::Initialize ();
286
+ // BEGIN SWIFT
280
287
::SwiftInitialize ();
288
+ // END SWIFT
281
289
282
290
#if defined(_WIN32)
283
291
ProcessWindows::Initialize ();
@@ -332,7 +340,9 @@ void SystemInitializerFull::Terminate() {
332
340
PluginManager::Terminate ();
333
341
334
342
ClangASTContext::Terminate ();
343
+ // BEGIN SWIFT
335
344
SwiftASTContext::Terminate ();
345
+ // END SWIFT
336
346
337
347
ArchitectureArm::Terminate ();
338
348
ArchitectureMips::Terminate ();
@@ -352,7 +362,9 @@ void SystemInitializerFull::Terminate() {
352
362
ThreadSanitizerRuntime::Terminate ();
353
363
UndefinedBehaviorSanitizerRuntime::Terminate ();
354
364
MainThreadCheckerRuntime::Terminate ();
365
+ // BEGIN SWIFT
355
366
SwiftRuntimeReporting::Terminate ();
367
+ // END SWIFT
356
368
SymbolVendorELF::Terminate ();
357
369
breakpad::SymbolFileBreakpad::Terminate ();
358
370
SymbolFileDWARF::Terminate ();
@@ -374,7 +386,9 @@ void SystemInitializerFull::Terminate() {
374
386
SystemRuntimeMacOSX::Terminate ();
375
387
RenderScriptRuntime::Terminate ();
376
388
389
+ // BEGIN SWIFT
377
390
::SwiftTerminate ();
391
+ // END SWIFT
378
392
379
393
CPlusPlusLanguage::Terminate ();
380
394
ObjCLanguage::Terminate ();
0 commit comments