[clang] f55c4b4 - [clang][Interp] Print Function address in dump()
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 29 03:51:48 PDT 2022
Author: Timm Bäder
Date: 2022-09-29T12:50:57+02:00
New Revision: f55c4b4ee3d11cb8028edeabed91284ec7c3276d
URL: https://github.com/llvm/llvm-project/commit/f55c4b4ee3d11cb8028edeabed91284ec7c3276d
DIFF: https://github.com/llvm/llvm-project/commit/f55c4b4ee3d11cb8028edeabed91284ec7c3276d.diff
LOG: [clang][Interp] Print Function address in dump()
It's used in the bytecode dump of the function itself, so useful to
identify which function is being called.
Added:
Modified:
clang/lib/AST/Interp/Disasm.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/Disasm.cpp b/clang/lib/AST/Interp/Disasm.cpp
index 2edf6b908c4a..82cc8492d57a 100644
--- a/clang/lib/AST/Interp/Disasm.cpp
+++ b/clang/lib/AST/Interp/Disasm.cpp
@@ -40,10 +40,11 @@ LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS) const {
if (F) {
if (auto *Cons = dyn_cast<CXXConstructorDecl>(F)) {
DeclarationName Name = Cons->getParent()->getDeclName();
- OS << Name << "::" << Name << ":\n";
+ OS << Name << "::" << Name;
} else {
- OS << F->getDeclName() << ":\n";
+ OS << F->getDeclName();
}
+ OS << " " << (void*)this << ":\n";
} else {
OS << "<<expr>>\n";
}
More information about the cfe-commits
mailing list