diff options
author | Devang Patel <dpatel@apple.com> | 2010-04-29 18:52:10 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-04-29 18:52:10 +0000 |
commit | 080e4fb2f046cfde37e6cccb65429731f35cbe8e (patch) | |
tree | 1703ab626e7ff6810297d95431b6df6e67f62951 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 6e7ca24907ab88f9d774c3a249a0c58233201392 (diff) | |
download | bcm5719-llvm-080e4fb2f046cfde37e6cccb65429731f35cbe8e.tar.gz bcm5719-llvm-080e4fb2f046cfde37e6cccb65429731f35cbe8e.zip |
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
llvm-svn: 102655
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index a694033fa1d..2c92de82d86 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -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. |