[Lldb-commits] [clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 2 01:43:18 PDT 2025
================
@@ -8511,8 +8512,16 @@ TypeSystemClang::dump(lldb::opaque_compiler_type_t type) const {
}
#endif
-void TypeSystemClang::Dump(llvm::raw_ostream &output) {
- GetTranslationUnitDecl()->dump(output);
+void TypeSystemClang::Dump(llvm::raw_ostream &output, llvm::StringRef filter) {
+ auto consumer =
+ clang::CreateASTDumper(output, filter,
+ /*DumpDecls=*/true,
+ /*Deserialize=*/false,
+ /*DumpLookups=*/false,
+ /*DumpDeclTypes=*/false, clang::ADOF_Default);
+ lldbassert(consumer);
+ lldbassert(m_ast_up);
----------------
labath wrote:
Use a plain assert? lldbassert is not going to help if you're going to dereference the pointer anyway.
https://github.com/llvm/llvm-project/pull/142164
More information about the lldb-commits
mailing list