diff options
author | Zachary Turner <zturner@google.com> | 2018-11-05 17:40:28 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-11-05 17:40:28 +0000 |
commit | 4911023fe3fd3a142d1077149fc3bcd9948dece8 (patch) | |
tree | 84ff1d143fe3fc2a15b0f7655559872001ef6cee /lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp | |
parent | 7509880b54fd47ae498cbbcd85293aebd9b00fa4 (diff) | |
download | bcm5719-llvm-4911023fe3fd3a142d1077149fc3bcd9948dece8.tar.gz bcm5719-llvm-4911023fe3fd3a142d1077149fc3bcd9948dece8.zip |
Add a target modules dump ast command.
This is useful for investigating the clang ast as you reconstruct
it via by parsing debug info. It can also be used to write tests
against.
Differential Revision: https://reviews.llvm.org/D54072
llvm-svn: 346149
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp index 0b71f6c6829..0baa7675f24 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp @@ -1356,6 +1356,14 @@ uint32_t SymbolFilePDB::FindTypes( return types.GetSize(); } +void SymbolFilePDB::DumpClangAST(Stream &s) { + auto type_system = GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus); + auto clang = llvm::dyn_cast_or_null<ClangASTContext>(type_system); + if (!clang) + return; + clang->Dump(s); +} + void SymbolFilePDB::FindTypesByRegex( const lldb_private::RegularExpression ®ex, uint32_t max_matches, lldb_private::TypeMap &types) { |