[clang] 785cadd - [clang][bytecode] Fix InterpFrame::dump() (#170682)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 4 21:53:55 PST 2025
Author: Timm Baeder
Date: 2025-12-05T06:53:50+01:00
New Revision: 785cadd1ccf4a9c7d3b4823fa3a58311df94ddda
URL: https://github.com/llvm/llvm-project/commit/785cadd1ccf4a9c7d3b4823fa3a58311df94ddda
DIFF: https://github.com/llvm/llvm-project/commit/785cadd1ccf4a9c7d3b4823fa3a58311df94ddda.diff
LOG: [clang][bytecode] Fix InterpFrame::dump() (#170682)
We should only call getThis() and getRVOPtr() if the frame has them.
Added:
Modified:
clang/lib/AST/ByteCode/Disasm.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Disasm.cpp b/clang/lib/AST/ByteCode/Disasm.cpp
index 30ed41cd37ca3..35937e3483e38 100644
--- a/clang/lib/AST/ByteCode/Disasm.cpp
+++ b/clang/lib/AST/ByteCode/Disasm.cpp
@@ -519,8 +519,14 @@ LLVM_DUMP_METHOD void InterpFrame::dump(llvm::raw_ostream &OS,
OS << " (" << F->getName() << ")";
}
OS << "\n";
- OS.indent(Spaces) << "This: " << getThis() << "\n";
- OS.indent(Spaces) << "RVO: " << getRVOPtr() << "\n";
+ if (hasThisPointer())
+ OS.indent(Spaces) << "This: " << getThis() << "\n";
+ else
+ OS.indent(Spaces) << "This: -\n";
+ if (Func && Func->hasRVO())
+ OS.indent(Spaces) << "RVO: " << getRVOPtr() << "\n";
+ else
+ OS.indent(Spaces) << "RVO: -\n";
OS.indent(Spaces) << "Depth: " << Depth << "\n";
OS.indent(Spaces) << "ArgSize: " << ArgSize << "\n";
OS.indent(Spaces) << "Args: " << (void *)Args << "\n";
More information about the cfe-commits
mailing list