Skip to content

Commit a2e0564

Browse files
Merge pull request #1468 from adrian-prantl/the-big-rename
Move SwiftASTContext & TypeSystemSwift* into Plugins/TypeSystem/Swift
2 parents f80cf18 + b5e1ab2 commit a2e0564

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+616
-543
lines changed

lldb/include/lldb/Symbol/LineTable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef liblldb_LineTable_h_
1010
#define liblldb_LineTable_h_
1111

12+
#include "lldb/Core/Address.h"
1213
#include "lldb/Core/ModuleChild.h"
1314
#include "lldb/Core/Section.h"
1415
#include "lldb/Symbol/LineEntry.h"

lldb/include/lldb/Target/SwiftLanguageRuntime.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,21 @@
1313
#ifndef liblldb_SwiftLanguageRuntime_h_
1414
#define liblldb_SwiftLanguageRuntime_h_
1515

16-
// C Includes
17-
// C++ Includes
18-
#include <mutex>
19-
#include <tuple>
20-
#include <vector>
21-
// Other libraries and framework includes
22-
// Project includes
2316
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
17+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
2418
#include "lldb/Breakpoint/BreakpointPrecondition.h"
2519
#include "lldb/Core/PluginInterface.h"
26-
#include "lldb/Symbol/SwiftASTContext.h"
2720
#include "lldb/Target/LanguageRuntime.h"
2821
#include "lldb/lldb-private.h"
2922

3023
#include "llvm/ADT/Optional.h"
3124
#include "llvm/ADT/StringSet.h"
3225
#include "llvm/Support/Casting.h"
3326

27+
#include <mutex>
28+
#include <tuple>
29+
#include <vector>
30+
3431
namespace swift {
3532
namespace remote {
3633
class MemoryReader;

lldb/source/API/SystemInitializerFull.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
#include "Plugins/ExpressionParser/Swift/SwiftREPL.h"
126126
#include "Plugins/InstrumentationRuntime/SwiftRuntimeReporting/SwiftRuntimeReporting.h"
127127
#include "Plugins/Language/Swift/SwiftLanguage.h"
128-
#include "lldb/Symbol/SwiftASTContext.h"
128+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
129129
#include "lldb/Target/SwiftLanguageRuntime.h"
130130
// END SWIFT
131131

lldb/source/Core/Module.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#include "Plugins/Language/ObjC/ObjCLanguage.h"
5555

5656
// BEGIN SWIFT
57-
#include "lldb/Symbol/SwiftASTContext.h"
57+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
5858
#include "lldb/Target/SwiftLanguageRuntime.h"
5959
// END SWIFT
6060

lldb/source/Core/ValueObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h"
5555

5656
// BEGIN SWIFT
57-
#include "lldb/Symbol/SwiftASTContext.h"
57+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
5858
// END SWIFT
5959

6060
#include "llvm/Support/Compiler.h"

lldb/source/Core/ValueObjectDynamicValue.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "lldb/Core/Value.h"
1111
#include "lldb/Core/ValueObject.h"
1212
#include "lldb/Symbol/CompilerType.h"
13-
#include "lldb/Symbol/SwiftASTContext.h"
1413
#include "lldb/Symbol/Type.h"
1514
#include "lldb/Target/ExecutionContext.h"
1615
#include "lldb/Target/LanguageRuntime.h"
@@ -23,6 +22,8 @@
2322
#include "lldb/Utility/Status.h"
2423
#include "lldb/lldb-types.h"
2524

25+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
26+
2627
#include <string.h>
2728
namespace lldb_private {
2829
class Declaration;

lldb/source/Core/ValueObjectVariable.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "lldb/Symbol/Declaration.h"
1717
#include "lldb/Symbol/Function.h"
1818
#include "lldb/Symbol/ObjectFile.h"
19-
#include "lldb/Symbol/SwiftASTContext.h"
2019
#include "lldb/Symbol/SymbolContext.h"
2120
#include "lldb/Symbol/SymbolContextScope.h"
2221
#include "lldb/Symbol/Type.h"
@@ -33,6 +32,8 @@
3332
#include "lldb/lldb-private-enumerations.h"
3433
#include "lldb/lldb-types.h"
3534

35+
#include "Plugins/TypeSystem/Swift/TypeSystemSwift.h"
36+
3637
#include "llvm/ADT/StringRef.h"
3738

3839
#include <assert.h>

lldb/source/Expression/Materializer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "lldb/Core/ValueObjectVariable.h"
1313
#include "lldb/Expression/ExpressionVariable.h"
1414
#include "lldb/Symbol/Symbol.h"
15-
#include "lldb/Symbol/SwiftASTContext.h"
1615
#include "lldb/Symbol/Type.h"
1716
#include "lldb/Symbol/Variable.h"
1817
#include "lldb/Target/ExecutionContext.h"
@@ -24,6 +23,8 @@
2423
#include "lldb/Utility/Log.h"
2524
#include "lldb/Utility/RegisterValue.h"
2625

26+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
27+
2728
#include <memory>
2829

2930
using namespace lldb_private;

lldb/source/Expression/UserExpression.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "lldb/Symbol/Block.h"
3131
#include "lldb/Symbol/Function.h"
3232
#include "lldb/Symbol/ObjectFile.h"
33-
#include "lldb/Symbol/SwiftASTContext.h"
3433
#include "lldb/Symbol/SymbolVendor.h"
3534
#include "lldb/Symbol/Type.h"
3635
#include "lldb/Symbol/TypeSystem.h"
@@ -45,6 +44,8 @@
4544
#include "lldb/Utility/Log.h"
4645
#include "lldb/Utility/StreamString.h"
4746

47+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
48+
4849
using namespace lldb_private;
4950

5051
char UserExpression::ID;

lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "lldb/Utility/Log.h"
1717
#include "lldb/Utility/StreamString.h"
1818

19-
#include "lldb/Symbol/SwiftASTContext.h" // Needed for llvm::isa<SwiftASTContext>(...)
19+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h" // Needed for llvm::isa<SwiftASTContext>(...)
2020
#include "lldb/Symbol/TypeSystem.h"
2121

2222
#include "swift/AST/Decl.h"

lldb/source/Plugins/ExpressionParser/Swift/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_lldb_library(lldbPluginExpressionParserSwift PLUGIN
2626
lldbSymbol
2727
lldbTarget
2828
lldbUtility
29+
lldbPluginTypeSystemSwift
2930
swiftAST
3031
swiftBasic
3132
swiftClangImporter

lldb/source/Plugins/ExpressionParser/Swift/SwiftASTManipulator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
#include "SwiftASTManipulator.h"
1414

15+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1516
#include "lldb/Expression/ExpressionParser.h"
1617
#include "lldb/Expression/ExpressionSourceCode.h"
17-
#include "lldb/Symbol/SwiftASTContext.h"
1818
#include "lldb/Target/Target.h"
1919
#include "lldb/Utility/ConstString.h"
2020
#include "lldb/Utility/Log.h"

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionSourceCode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "SwiftExpressionSourceCode.h"
1010

1111
#include "Plugins/ExpressionParser/Swift/SwiftASTManipulator.h"
12-
#include "lldb/Symbol/SwiftASTContext.h"
12+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1313
#include "lldb/Target/Language.h"
1414
#include "lldb/Target/Platform.h"
1515
#include "lldb/Target/Target.h"

lldb/source/Plugins/ExpressionParser/Swift/SwiftPersistentExpressionState.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212

1313
#include "SwiftPersistentExpressionState.h"
1414
#include "SwiftExpressionVariable.h"
15-
#include "lldb/Expression/IRExecutionUnit.h"
1615

1716
#include "lldb/Core/Value.h"
18-
19-
#include "lldb/Symbol/SwiftASTContext.h" // Needed for llvm::isa<SwiftASTContext>(...)
17+
#include "lldb/Expression/IRExecutionUnit.h"
2018
#include "lldb/Symbol/TypeSystem.h"
21-
2219
#include "lldb/Utility/DataExtractor.h"
2320
#include "lldb/Utility/Log.h"
2421
#include "lldb/Utility/StreamString.h"

lldb/source/Plugins/ExpressionParser/Swift/SwiftREPL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "SwiftExpressionVariable.h"
1616

17+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1718
#include "lldb/Core/Debugger.h"
1819
#include "lldb/Core/Module.h"
1920
#include "lldb/Core/PluginManager.h"
@@ -25,7 +26,6 @@
2526
#include "lldb/Interpreter/CommandInterpreter.h"
2627
#include "lldb/Interpreter/CommandReturnObject.h"
2728
#include "lldb/Symbol/ObjectFile.h"
28-
#include "lldb/Symbol/SwiftASTContext.h"
2929
#include "lldb/Symbol/SymbolVendor.h"
3030
#include "lldb/Target/Process.h"
3131
#include "lldb/Target/Target.h"

lldb/source/Plugins/ExpressionParser/Swift/SwiftREPL.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
#ifndef liblldb_SwiftREPL_h_
1414
#define liblldb_SwiftREPL_h_
1515

16-
#include "lldb/Symbol/SwiftASTContext.h"
17-
#include "lldb/Utility/Status.h"
1816
#include "lldb/Expression/REPL.h"
17+
#include "lldb/Utility/Status.h"
1918
#include "lldb/lldb-public.h"
2019

2120
#include <string>
@@ -24,6 +23,7 @@
2423
namespace lldb_private {
2524

2625
class IRExecutionUnit;
26+
class SwiftASTContextForExpressions;
2727

2828
//----------------------------------------------------------------------
2929
/// @class SwiftREPL SwiftREPL.h "lldb/Expression/SwiftREPL.h"

lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "lldb/Breakpoint/StoppointCallbackContext.h"
1212
#include "lldb/Core/Module.h"
1313
#include "lldb/Core/PluginManager.h"
14-
#include "lldb/Symbol/SwiftASTContext.h"
1514
#include "lldb/Symbol/Symbol.h"
1615
#include "lldb/Symbol/SymbolContext.h"
1716
#include "lldb/Symbol/Variable.h"
@@ -24,6 +23,8 @@
2423
#include "lldb/Target/Thread.h"
2524
#include "lldb/Utility/RegularExpression.h"
2625
#include "Plugins/Process/Utility/HistoryThread.h"
26+
27+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
2728
#include "swift/AST/ASTContext.h"
2829
#include "swift/AST/NameLookup.h"
2930
#include "swift/ClangImporter/ClangImporter.h"

lldb/source/Plugins/Language/Swift/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ add_lldb_library(lldbPluginSwiftLanguage PLUGIN
2323
lldbTarget
2424
lldbUtility
2525
lldbPluginObjCLanguage
26+
lldbPluginTypeSystemSwift
2627
swiftAST
2728
swiftClangImporter
2829
clangAST

lldb/source/Plugins/Language/Swift/SwiftArray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#include "SwiftArray.h"
1414

1515
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
16+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1617
#include "lldb/Core/ValueObjectConstResult.h"
1718
#include "lldb/DataFormatters/FormattersHelpers.h"
18-
#include "lldb/Symbol/SwiftASTContext.h"
1919
#include "lldb/Target/Process.h"
2020
#include "lldb/Target/SwiftLanguageRuntime.h"
2121
#include "lldb/Target/Target.h"

lldb/source/Plugins/Language/Swift/SwiftDictionary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
#include "SwiftDictionary.h"
1414

15-
#include "lldb/DataFormatters/FormattersHelpers.h"
1615
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
17-
#include "lldb/Symbol/SwiftASTContext.h"
16+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
17+
#include "lldb/DataFormatters/FormattersHelpers.h"
1818
#include "lldb/Target/Process.h"
1919
#include "lldb/Target/SwiftLanguageRuntime.h"
2020

lldb/source/Plugins/Language/Swift/SwiftHashedContainer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
1616
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
17+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1718
#include "lldb/Core/ValueObjectConstResult.h"
1819
#include "lldb/DataFormatters/FormattersHelpers.h"
19-
#include "lldb/Symbol/SwiftASTContext.h"
2020
#include "lldb/Target/Process.h"
2121
#include "lldb/Target/SwiftLanguageRuntime.h"
2222
#include "lldb/Utility/DataBufferHeap.h"

lldb/source/Plugins/Language/Swift/SwiftOptionSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
#include "SwiftOptionSet.h"
1414

1515
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
16+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1617
#include "lldb/Core/ValueObject.h"
1718
#include "lldb/Symbol/CompilerType.h"
18-
#include "lldb/Symbol/SwiftASTContext.h"
1919
#include "lldb/Utility/StreamString.h"
2020

2121
#include "swift/AST/Decl.h"

lldb/source/Plugins/Language/Swift/SwiftOptional.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "SwiftOptional.h"
14+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1415
#include "lldb/DataFormatters/DataVisualization.h"
1516
#include "lldb/DataFormatters/TypeSummary.h"
1617
#include "lldb/DataFormatters/ValueObjectPrinter.h"
17-
#include "lldb/Symbol/SwiftASTContext.h"
1818
#include "lldb/Target/Process.h"
1919
#include "lldb/Target/SwiftLanguageRuntime.h"
2020
#include "lldb/Utility/DataBufferHeap.h"

lldb/source/Plugins/Language/Swift/SwiftSet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
#include "SwiftSet.h"
1414

15-
#include "lldb/DataFormatters/FormattersHelpers.h"
1615
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
17-
#include "lldb/Symbol/SwiftASTContext.h"
16+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
17+
#include "lldb/DataFormatters/FormattersHelpers.h"
1818
#include "lldb/Target/Process.h"
1919
#include "lldb/Target/SwiftLanguageRuntime.h"
2020

lldb/source/Plugins/Language/Swift/SwiftUnsafeTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "SwiftUnsafeTypes.h"
22

3+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
34
#include "lldb/DataFormatters/TypeSynthetic.h"
4-
#include "lldb/Symbol/SwiftASTContext.h"
55
#include "lldb/Target/SwiftLanguageRuntime.h"
66
#include "lldb/Utility/Log.h"
77
#include "lldb/Utility/Logging.h"

lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserSwift.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
#include "clang/AST/DeclObjC.h"
2727

2828
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
29+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
2930
#include "lldb/Core/Module.h"
3031
#include "lldb/Symbol/CompileUnit.h"
3132
#include "lldb/Symbol/Function.h"
3233
#include "lldb/Symbol/ObjectFile.h"
33-
#include "lldb/Symbol/SwiftASTContext.h"
3434
#include "lldb/Symbol/SymbolVendor.h"
3535
#include "lldb/Symbol/Type.h"
3636
#include "lldb/Symbol/TypeMap.h"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
add_subdirectory(Clang)
2+
add_subdirectory(Swift)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
add_lldb_library(lldbPluginTypeSystemSwift PLUGIN
2+
TypeSystemSwift.cpp
3+
TypeSystemSwiftTypeRef.cpp
4+
SwiftASTContext.cpp
5+
6+
LINK_LIBS
7+
lldbCore
8+
lldbSymbol
9+
lldbTarget
10+
lldbUtility
11+
12+
LINK_COMPONENTS
13+
Support
14+
)

lldb/source/Symbol/SwiftASTContext.cpp renamed to lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "lldb/Symbol/SwiftASTContext.h"
13+
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
1414

1515
// C++ Includes
1616
#include <mutex> // std::once
@@ -2238,7 +2238,7 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
22382238
logError("couldn't load the Swift stdlib");
22392239
return {};
22402240
}
2241-
2241+
22422242
return swift_ast_sp;
22432243
}
22442244

@@ -8308,8 +8308,8 @@ bool SwiftASTContext::GetImplicitImports(
83088308
for (ConstString name : persistent_expression_state->GetHandLoadedModules()) {
83098309
SourceModule module_info;
83108310
module_info.path.push_back(name);
8311-
auto *module = LoadOneModule(module_info, swift_ast_context, stack_frame_wp,
8312-
error);
8311+
auto *module =
8312+
LoadOneModule(module_info, swift_ast_context, stack_frame_wp, error);
83138313
if (!module)
83148314
return false;
83158315

0 commit comments

Comments
 (0)