Index: include/lldb/Core/ArchSpec.h =================================================================== --- include/lldb/Core/ArchSpec.h +++ include/lldb/Core/ArchSpec.h @@ -12,9 +12,8 @@ #if defined(__cplusplus) -#include "lldb/lldb-private.h" +#include "lldb/lldb-forward.h" #include "lldb/Core/ConstString.h" -#include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" namespace lldb_private { @@ -290,44 +289,6 @@ //------------------------------------------------------------------ void MergeFrom(const ArchSpec &other); - - //------------------------------------------------------------------ - /// Sets this ArchSpec according to the given architecture name. - /// - /// The architecture name can be one of the generic system default - /// values: - /// - /// @li \c LLDB_ARCH_DEFAULT - The arch the current system defaults - /// to when a program is launched without any extra - /// attributes or settings. - /// @li \c LLDB_ARCH_DEFAULT_32BIT - The default host architecture - /// for 32 bit (if any). - /// @li \c LLDB_ARCH_DEFAULT_64BIT - The default host architecture - /// for 64 bit (if any). - /// - /// Alternatively, if the object type of this ArchSpec has been - /// configured, a concrete architecture can be specified to set - /// the CPU type ("x86_64" for example). - /// - /// Finally, an encoded object and archetecture format is accepted. - /// The format contains an object type (like "macho" or "elf"), - /// followed by a platform dependent encoding of CPU type and - /// subtype. For example: - /// - /// "macho" : Specifies an object type of MachO. - /// "macho-16-6" : MachO specific encoding for ARMv6. - /// "elf-43 : ELF specific encoding for Sparc V9. - /// - /// @param[in] arch_name The name of an architecture. - /// - /// @return True if @p arch_name was successfully translated, false - /// otherwise. - //------------------------------------------------------------------ -// bool -// SetArchitecture (const llvm::StringRef& arch_name); -// -// bool -// SetArchitecture (const char *arch_name); //------------------------------------------------------------------ /// Change the architecture object type and CPU type. Index: include/lldb/Core/Module.h =================================================================== --- include/lldb/Core/Module.h +++ include/lldb/Core/Module.h @@ -10,12 +10,12 @@ #ifndef liblldb_Module_h_ #define liblldb_Module_h_ +#include "lldb/lldb-forward.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/UUID.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/Mutex.h" #include "lldb/Host/TimeValue.h" -#include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/SymbolContextScope.h" #include "lldb/Target/PathMappingList.h" @@ -1098,7 +1098,7 @@ mutable Mutex m_mutex; ///< A mutex to keep this object happy in multi-threaded environments. TimeValue m_mod_time; ///< The modification time for this module when it was created. ArchSpec m_arch; ///< The architecture for this module. - lldb_private::UUID m_uuid; ///< Each module is assumed to have a unique identifier to help match it up to debug symbols. + UUID m_uuid; ///< Each module is assumed to have a unique identifier to help match it up to debug symbols. FileSpec m_file; ///< The file representation on disk for this module (if there is one). FileSpec m_platform_file;///< The path to the module on the platform on which it is being debugged FileSpec m_remote_install_file; ///< If set when debugging on remote platforms, this module will be installed at this location @@ -1107,10 +1107,10 @@ uint64_t m_object_offset; TimeValue m_object_mod_time; lldb::ObjectFileSP m_objfile_sp; ///< A shared pointer to the object file parser for this module as it may or may not be shared with the SymbolFile - std::unique_ptr m_symfile_ap; ///< A pointer to the symbol vendor for this module. - ClangASTContext m_ast; ///< The AST context for this module. + lldb::SymbolVendorUP m_symfile_ap; ///< A pointer to the symbol vendor for this module. + lldb::ClangASTContextUP m_ast; ///< The AST context for this module. PathMappingList m_source_mappings; ///< Module specific source remappings for when you have debug info for a module that doesn't match where the sources currently are - std::unique_ptr m_sections_ap; ///< Unified section list for module that is used by the ObjectFile and and ObjectFile instances for the debug info + lldb::SectionListUP m_sections_ap; ///< Unified section list for module that is used by the ObjectFile and and ObjectFile instances for the debug info bool m_did_load_objfile:1, m_did_load_symbol_vendor:1, Index: include/lldb/lldb-forward.h =================================================================== --- include/lldb/lldb-forward.h +++ include/lldb/lldb-forward.h @@ -301,6 +301,7 @@ typedef std::weak_ptr BreakpointLocationWP; typedef std::shared_ptr BreakpointResolverSP; typedef std::shared_ptr BroadcasterSP; + typedef std::unique_ptr ClangASTContextUP; typedef std::shared_ptr ClangExpressionVariableSP; typedef std::shared_ptr CommandObjectSP; typedef std::shared_ptr CommunicationSP; @@ -369,6 +370,7 @@ typedef std::shared_ptr ScriptSummaryFormatSP; #endif // #ifndef LLDB_DISABLE_PYTHON typedef std::shared_ptr SectionSP; + typedef std::unique_ptr SectionListUP; typedef std::weak_ptr SectionWP; typedef std::shared_ptr SectionLoadListSP; typedef std::shared_ptr SearchFilterSP; @@ -387,6 +389,7 @@ typedef std::shared_ptr SymbolFileTypeSP; typedef std::weak_ptr SymbolFileTypeWP; typedef std::shared_ptr SymbolContextSpecifierSP; + typedef std::unique_ptr SymbolVendorUP; typedef std::shared_ptr SyntheticChildrenSP; typedef std::shared_ptr SyntheticChildrenFrontEndSP; typedef std::shared_ptr TargetSP; Index: source/API/SBModule.cpp =================================================================== --- source/API/SBModule.cpp +++ source/API/SBModule.cpp @@ -20,6 +20,7 @@ #include "lldb/Core/StreamString.h" #include "lldb/Core/ValueObjectList.h" #include "lldb/Core/ValueObjectVariable.h" +#include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Symbol/Symtab.h" Index: source/Core/Module.cpp =================================================================== --- source/Core/Module.cpp +++ source/Core/Module.cpp @@ -26,6 +26,7 @@ #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/ScriptInterpreter.h" #include "lldb/lldb-private-log.h" +#include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolContext.h" @@ -145,7 +146,7 @@ m_object_mod_time (), m_objfile_sp (), m_symfile_ap (), - m_ast (), + m_ast (new ClangASTContext), m_source_mappings (), m_sections_ap(), m_did_load_objfile (false), @@ -249,7 +250,7 @@ m_object_mod_time (), m_objfile_sp (), m_symfile_ap (), - m_ast (), + m_ast (new ClangASTContext), m_source_mappings (), m_sections_ap(), m_did_load_objfile (false), @@ -295,7 +296,7 @@ m_object_mod_time (), m_objfile_sp (), m_symfile_ap (), - m_ast (), + m_ast (new ClangASTContext), m_source_mappings (), m_sections_ap(), m_did_load_objfile (false), @@ -440,10 +441,10 @@ object_arch.GetTriple().setOS(llvm::Triple::MacOSX); } } - m_ast.SetArchitecture (object_arch); + m_ast->SetArchitecture (object_arch); } } - return m_ast; + return *m_ast; } void Index: source/Expression/ClangASTSource.cpp =================================================================== --- source/Expression/ClangASTSource.cpp +++ source/Expression/ClangASTSource.cpp @@ -16,6 +16,7 @@ #include "lldb/Expression/ASTDumper.h" #include "lldb/Expression/ClangASTSource.h" #include "lldb/Expression/ClangExpression.h" +#include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ClangNamespaceDecl.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/SymbolVendor.h" Index: source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp =================================================================== --- source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -17,6 +17,7 @@ #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" #include "lldb/Core/State.h" +#include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/ObjCLanguageRuntime.h" Index: source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp =================================================================== --- source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp +++ source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp @@ -20,6 +20,7 @@ #include "lldb/Expression/ClangFunction.h" #include "lldb/Expression/ClangUtilityFunction.h" #include "lldb/Host/FileSpec.h" +#include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolContext.h" #include "Plugins/Process/Utility/HistoryThread.h"