diff options
author | Greg Clayton <gclayton@apple.com> | 2015-08-28 01:01:03 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-08-28 01:01:03 +0000 |
commit | 261ac3f4b5b98d02dd8718078015a92cf07df736 (patch) | |
tree | 41a418956454371770a09f6b3686f6858550c7c9 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | b5288ba9d103159ea3a32147d3c71be25576c482 (diff) | |
download | llvm-261ac3f4b5b98d02dd8718078015a92cf07df736.zip llvm-261ac3f4b5b98d02dd8718078015a92cf07df736.tar.gz llvm-261ac3f4b5b98d02dd8718078015a92cf07df736.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions