hanchenye-llvm-project/lldb/source/Symbol
Greg Clayton 261ac3f4b5 Made a new abstract class named "DWARFASTParser" which lives in "source/Plugins/SymbolFile/DWARF":
class DWARFASTParser
{
public:
    virtual ~DWARFASTParser() {}

    virtual lldb::TypeSP
    ParseTypeFromDWARF (const lldb_private::SymbolContext& sc,
                        const DWARFDIE &die,
                        lldb_private::Log *log,
                        bool *type_is_new_ptr) = 0;


    virtual lldb_private::Function *
    ParseFunctionFromDWARF (const lldb_private::SymbolContext& sc,
                            const DWARFDIE &die) = 0;

    virtual bool
    CompleteTypeFromDWARF (const DWARFDIE &die,
                           lldb_private::Type *type,
                           lldb_private::CompilerType &clang_type) = 0;

    virtual lldb_private::CompilerDeclContext
    GetDeclContextForUIDFromDWARF (const DWARFDIE &die) = 0;

    virtual lldb_private::CompilerDeclContext
    GetDeclContextContainingUIDFromDWARF (const DWARFDIE &die) = 0;

};

We have one subclass named DWARFASTParserClang that implements all of the clang specific AST type parsing. This keeps all DWARF parsing in the DWARF plug-in. Moved all of the DWARF parsing code that was in ClangASTContext over into DWARFASTParserClang.

lldb_private::TypeSystem classes no longer have any DWARF parsing functions in them, but they can hand out a DWARFASTParser:

virtual DWARFASTParser *
GetDWARFParser ()
{
    return nullptr;
}

This keeps things clean and makes for easy merging when we have different AST's for different languages.

llvm-svn: 246242
2015-08-28 01:01:03 +00:00
..
Block.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
CMakeLists.txt Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
ClangASTContext.cpp Made a new abstract class named "DWARFASTParser" which lives in "source/Plugins/SymbolFile/DWARF": 2015-08-28 01:01:03 +00:00
ClangASTImporter.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
ClangExternalASTSourceCallbacks.cpp Fix error introduced by changing function signatures. 2015-03-24 18:56:08 +00:00
ClangExternalASTSourceCommon.cpp Fixed an unfortunate reversed conditional that 2014-12-06 02:31:49 +00:00
CompactUnwindInfo.cpp A messy bit of cleanup: Move towards more descriptive names 2015-08-15 01:21:01 +00:00
CompileUnit.cpp Remove class Language - the only thing it was actually being used for is provided by LanguageRuntime already 2015-08-27 18:18:49 +00:00
CompilerDeclContext.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
CompilerType.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
DWARFCallFrameInfo.cpp Fix typos. 2015-07-22 00:16:02 +00:00
Declaration.cpp For some reason, sometimes the directory paths that clang emits have internal 2014-11-15 01:54:26 +00:00
FuncUnwinders.cpp Improve instruction emulation based stack unwinding on ARM 2015-06-24 11:27:32 +00:00
Function.cpp Handle DW_OP_GNU_addr_index in DWARF expressions 2015-08-25 11:46:06 +00:00
LineEntry.cpp
LineTable.cpp Fix typos. 2015-07-22 00:16:02 +00:00
Makefile
ObjectFile.cpp Add support for DW_FORM_GNU_[addr,str]_index 2015-08-25 11:45:58 +00:00
Symbol.cpp Make many mangled functions that might demangle a name be allowed to specify a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. 2015-07-08 22:32:23 +00:00
SymbolContext.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
SymbolFile.cpp Fix source manager regression caused by r245905 2015-08-25 10:27:38 +00:00
SymbolVendor.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
Symtab.cpp Make many mangled functions that might demangle a name be allowed to specify a language to use in order to soon support Pascal and Java demangling. Dawn Perchik will take care of making this so. 2015-07-08 22:32:23 +00:00
Type.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
TypeList.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
TypeSystem.cpp Major DWARF cleanup. 2015-08-26 22:57:51 +00:00
UnwindPlan.cpp Improve instruction emulation based stack unwinding on ARM 2015-06-24 11:27:32 +00:00
UnwindTable.cpp A messy bit of cleanup: Move towards more descriptive names 2015-08-15 01:21:01 +00:00
Variable.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
VariableList.cpp Fix resolution conflict between global and class static variables in C++ 2015-08-18 22:46:57 +00:00
VerifyDecl.cpp