Improve debugability of clang decls (#7945)

Add `Dump` functions for `ClangDecl`/`ClangDeclSignature`, and add
`MakeClangDeclId`/`MakeClangDeclSignatureId` and add those to
`lldbinit.py`.

Also change the label for `ClangDeclId` and `ClangDeclSignatureId` to
not have an "_id" suffix, to make them consistent with other ID types.
This commit is contained in:
Nicholas Bishop authored and GitHub committed 2026-10-09 20:24:23 +00:00
1 parent 9887d23b3f
commit 04443a9a14
7 files changed
+64 -13

No files matched your search

+12
View File
@@ -54,6 +54,18 @@ LLVM_DUMP_METHOD static auto Dump(
return SemIR::Dump(context.sem_ir(), generated_function_id);
}
LLVM_DUMP_METHOD static auto Dump(const Context& context,
SemIR::ClangDeclId clang_decl_id)
-> std::string {
return SemIR::Dump(context.sem_ir(), clang_decl_id);
}
LLVM_DUMP_METHOD static auto Dump(
const Context& context, SemIR::ClangDeclSignatureId clang_decl_signature_id)
-> std::string {
return SemIR::Dump(context.sem_ir(), clang_decl_signature_id);
}
LLVM_DUMP_METHOD static auto Dump(const Context& context,
SemIR::ClassId class_id) -> std::string {
return SemIR::Dump(context.sem_ir(), class_id);