Author: Timm Baeder Date: 2026-04-14T08:49:10+02:00 New Revision: 8c9ce1293726734a661f88a97852be200e24449c
URL: https://github.com/llvm/llvm-project/commit/8c9ce1293726734a661f88a97852be200e24449c DIFF: https://github.com/llvm/llvm-project/commit/8c9ce1293726734a661f88a97852be200e24449c.diff LOG: [clang][bytecode] Use qualified name in `Function::dump()` (#191958) Added: Modified: clang/lib/AST/ByteCode/Disasm.cpp clang/lib/AST/ByteCode/Program.h Removed: ################################################################################ diff --git a/clang/lib/AST/ByteCode/Disasm.cpp b/clang/lib/AST/ByteCode/Disasm.cpp index f4355522eb8e0..6a90c6ab98fa6 100644 --- a/clang/lib/AST/ByteCode/Disasm.cpp +++ b/clang/lib/AST/ByteCode/Disasm.cpp @@ -150,7 +150,14 @@ LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS, } { ColorScope SC(OS, true, {llvm::raw_ostream::BRIGHT_GREEN, true}); - OS << getName() << " " << (const void *)this << "\n"; + if (const FunctionDecl *FD = getDecl()) { + FD->getNameForDiagnostic( + OS, P.getContext().getASTContext().getPrintingPolicy(), + /*Qualified=*/true); + } else { + OS << getName(); + } + OS << " " << (const void *)this << "\n"; } OS << "frame size: " << getFrameSize() << "\n"; OS << "arg size: " << getArgSize() << "\n"; diff --git a/clang/lib/AST/ByteCode/Program.h b/clang/lib/AST/ByteCode/Program.h index 91126a51e8ddc..e3ec0c07736a3 100644 --- a/clang/lib/AST/ByteCode/Program.h +++ b/clang/lib/AST/ByteCode/Program.h @@ -54,6 +54,8 @@ class Program final { } } + const Context &getContext() const { return Ctx; } + /// Marshals a native pointer to an ID for embedding in bytecode. unsigned getOrCreateNativePointer(const void *Ptr); _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
