Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lldb/include/lldb/Symbol/LineTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef liblldb_LineTable_h_
#define liblldb_LineTable_h_

#include "lldb/Core/Address.h"
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/Section.h"
#include "lldb/Symbol/LineEntry.h"
Expand Down
13 changes: 5 additions & 8 deletions lldb/include/lldb/Target/SwiftLanguageRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,21 @@
#ifndef liblldb_SwiftLanguageRuntime_h_
#define liblldb_SwiftLanguageRuntime_h_

// C Includes
// C++ Includes
#include <mutex>
#include <tuple>
#include <vector>
// Other libraries and framework includes
// Project includes
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Breakpoint/BreakpointPrecondition.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/LanguageRuntime.h"
#include "lldb/lldb-private.h"

#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Casting.h"

#include <mutex>
#include <tuple>
#include <vector>

namespace swift {
namespace remote {
class MemoryReader;
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/API/SystemInitializerFull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
#include "Plugins/ExpressionParser/Swift/SwiftREPL.h"
#include "Plugins/InstrumentationRuntime/SwiftRuntimeReporting/SwiftRuntimeReporting.h"
#include "Plugins/Language/Swift/SwiftLanguage.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
// END SWIFT

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Core/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include "Plugins/Language/ObjC/ObjCLanguage.h"

// BEGIN SWIFT
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
// END SWIFT

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Core/ValueObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h"

// BEGIN SWIFT
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
// END SWIFT

#include "llvm/Support/Compiler.h"
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Core/ValueObjectDynamicValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/LanguageRuntime.h"
Expand All @@ -23,6 +22,8 @@
#include "lldb/Utility/Status.h"
#include "lldb/lldb-types.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"

#include <string.h>
namespace lldb_private {
class Declaration;
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Core/ValueObjectVariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "lldb/Symbol/Declaration.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Symbol/SymbolContextScope.h"
#include "lldb/Symbol/Type.h"
Expand All @@ -33,6 +32,8 @@
#include "lldb/lldb-private-enumerations.h"
#include "lldb/lldb-types.h"

#include "Plugins/TypeSystem/Swift/TypeSystemSwift.h"

#include "llvm/ADT/StringRef.h"

#include <assert.h>
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Expression/Materializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "lldb/Core/ValueObjectVariable.h"
#include "lldb/Expression/ExpressionVariable.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/Variable.h"
#include "lldb/Target/ExecutionContext.h"
Expand All @@ -24,6 +23,8 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegisterValue.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"

#include <memory>

using namespace lldb_private;
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Expression/UserExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/TypeSystem.h"
Expand All @@ -45,6 +44,8 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"

using namespace lldb_private;

char UserExpression::ID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"

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

#include "swift/AST/Decl.h"
Expand Down
1 change: 1 addition & 0 deletions lldb/source/Plugins/ExpressionParser/Swift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_lldb_library(lldbPluginExpressionParserSwift PLUGIN
lldbSymbol
lldbTarget
lldbUtility
lldbPluginTypeSystemSwift
swiftAST
swiftBasic
swiftClangImporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include "SwiftASTManipulator.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Expression/ExpressionParser.h"
#include "lldb/Expression/ExpressionSourceCode.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Log.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "SwiftExpressionSourceCode.h"

#include "Plugins/ExpressionParser/Swift/SwiftASTManipulator.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/Target.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@

#include "SwiftPersistentExpressionState.h"
#include "SwiftExpressionVariable.h"
#include "lldb/Expression/IRExecutionUnit.h"

#include "lldb/Core/Value.h"

#include "lldb/Symbol/SwiftASTContext.h" // Needed for llvm::isa<SwiftASTContext>(...)
#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Symbol/TypeSystem.h"

#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/ExpressionParser/Swift/SwiftREPL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "SwiftExpressionVariable.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
Expand All @@ -25,7 +26,6 @@
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Plugins/ExpressionParser/Swift/SwiftREPL.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
#ifndef liblldb_SwiftREPL_h_
#define liblldb_SwiftREPL_h_

#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Utility/Status.h"
#include "lldb/Expression/REPL.h"
#include "lldb/Utility/Status.h"
#include "lldb/lldb-public.h"

#include <string>
Expand All @@ -24,6 +23,7 @@
namespace lldb_private {

class IRExecutionUnit;
class SwiftASTContextForExpressions;

//----------------------------------------------------------------------
/// @class SwiftREPL SwiftREPL.h "lldb/Expression/SwiftREPL.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "lldb/Breakpoint/StoppointCallbackContext.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Symbol/Variable.h"
Expand All @@ -24,6 +23,8 @@
#include "lldb/Target/Thread.h"
#include "lldb/Utility/RegularExpression.h"
#include "Plugins/Process/Utility/HistoryThread.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "swift/AST/ASTContext.h"
#include "swift/AST/NameLookup.h"
#include "swift/ClangImporter/ClangImporter.h"
Expand Down
1 change: 1 addition & 0 deletions lldb/source/Plugins/Language/Swift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ add_lldb_library(lldbPluginSwiftLanguage PLUGIN
lldbTarget
lldbUtility
lldbPluginObjCLanguage
lldbPluginTypeSystemSwift
swiftAST
swiftClangImporter
clangAST
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/Language/Swift/SwiftArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include "SwiftArray.h"

#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
#include "lldb/Target/Target.h"
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Plugins/Language/Swift/SwiftDictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include "SwiftDictionary.h"

#include "lldb/DataFormatters/FormattersHelpers.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/SwiftLanguageRuntime.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
#include "lldb/Utility/DataBufferHeap.h"
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/Language/Swift/SwiftOptionSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include "SwiftOptionSet.h"

#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Utility/StreamString.h"

#include "swift/AST/Decl.h"
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/Language/Swift/SwiftOptional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
//===----------------------------------------------------------------------===//

#include "SwiftOptional.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/DataFormatters/DataVisualization.h"
#include "lldb/DataFormatters/TypeSummary.h"
#include "lldb/DataFormatters/ValueObjectPrinter.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
#include "lldb/Utility/DataBufferHeap.h"
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Plugins/Language/Swift/SwiftSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include "SwiftSet.h"

#include "lldb/DataFormatters/FormattersHelpers.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/SwiftLanguageRuntime.h"

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/Language/Swift/SwiftUnsafeTypes.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "SwiftUnsafeTypes.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/DataFormatters/TypeSynthetic.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/Logging.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
#include "clang/AST/DeclObjC.h"

#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Core/Module.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/TypeMap.h"
Expand Down
1 change: 1 addition & 0 deletions lldb/source/Plugins/TypeSystem/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_subdirectory(Clang)
add_subdirectory(Swift)
14 changes: 14 additions & 0 deletions lldb/source/Plugins/TypeSystem/Swift/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
add_lldb_library(lldbPluginTypeSystemSwift PLUGIN
TypeSystemSwift.cpp
TypeSystemSwiftTypeRef.cpp
SwiftASTContext.cpp

LINK_LIBS
lldbCore
lldbSymbol
lldbTarget
lldbUtility

LINK_COMPONENTS
Support
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"

// C++ Includes
#include <mutex> // std::once
Expand Down Expand Up @@ -2238,7 +2238,7 @@ lldb::TypeSystemSP SwiftASTContext::CreateInstance(lldb::LanguageType language,
logError("couldn't load the Swift stdlib");
return {};
}

return swift_ast_sp;
}

Expand Down Expand Up @@ -8308,8 +8308,8 @@ bool SwiftASTContext::GetImplicitImports(
for (ConstString name : persistent_expression_state->GetHandLoadedModules()) {
SourceModule module_info;
module_info.path.push_back(name);
auto *module = LoadOneModule(module_info, swift_ast_context, stack_frame_wp,
error);
auto *module =
LoadOneModule(module_info, swift_ast_context, stack_frame_wp, error);
if (!module)
return false;

Expand Down
Loading