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/Target | |
| 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/Target')
| -rw-r--r-- | llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp index 32d5ceeecd3..effc8ed3811 100644 --- a/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp @@ -345,6 +345,8 @@ void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI, O << '\t' << MAI->getCommentString() << "DEBUG_VALUE: "; // cast away const; DIetc do not take const operands for some reason. DIVariable V(const_cast<MDNode *>(MI->getOperand(NOps-1).getMetadata())); + if (V.getContext().isSubprogram()) + O << DISubprogram(V.getContext().getNode()).getDisplayName() << ":"; O << V.getName(); O << " <- "; // Frame address. Currently handles register +- offset only. |

