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
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index fab43e9..9125dab 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -1391,6 +1391,12 @@
return 0;
}
+void SymbolFileNativePDB::DumpClangAST(Stream &s) {
+ if (!m_clang)
+ return;
+ m_clang->Dump(s);
+}
+
uint32_t SymbolFileNativePDB::FindGlobalVariables(
const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
uint32_t max_matches, VariableList &variables) {