mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Print variable scope name in DEBUG_VALUE comment. Useful in some cases. e.g.
##DEBUG_VALUE: runOnMachineFunction:this <- RDI+0 ##DEBUG_VALUE: runOnMachineFunction:fn <- RSI+0 ##DEBUG_VALUE: DeadDefs <- undef ## SimpleRegisterCoalescing.cpp:2706 ##DEBUG_VALUE: getRegInfo:this <- [%rsp+$56]+$0 ##DEBUG_VALUE: getTarget:this <- [%rsp+$56]+$0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -502,6 +502,8 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
|
||||
|
||||
// cast away const; DIetc do not take const operands for some reason.
|
||||
DIVariable V(const_cast<MDNode*>(MI->getOperand(2).getMetadata()));
|
||||
if (V.getContext().isSubprogram())
|
||||
OS << DISubprogram(V.getContext().getNode()).getDisplayName() << ":";
|
||||
OS << V.getName() << " <- ";
|
||||
|
||||
// Register or immediate value. Register 0 means undef.
|
||||
|
||||
Reference in New Issue
Block a user