mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Print DBG_VALUE variable's location info as a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136916 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d9f3fc7faa
commit
4d3586dd23
@ -1516,7 +1516,19 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
|
||||
}
|
||||
|
||||
// Print debug location information.
|
||||
if (!debugLoc.isUnknown() && MF) {
|
||||
if (isDebugValue() && getOperand(e - 1).isMetadata()) {
|
||||
if (!HaveSemi) OS << ";"; HaveSemi = true;
|
||||
DIVariable DV(getOperand(e - 1).getMetadata());
|
||||
OS << " line no:" << DV.getLineNumber();
|
||||
if (MDNode *InlinedAt = DV.getInlinedAt()) {
|
||||
DebugLoc InlinedAtDL = DebugLoc::getFromDILocation(InlinedAt);
|
||||
if (!InlinedAtDL.isUnknown()) {
|
||||
OS << " inlined @[ ";
|
||||
printDebugLoc(InlinedAtDL, MF, OS);
|
||||
OS << " ]";
|
||||
}
|
||||
}
|
||||
} else if (!debugLoc.isUnknown() && MF) {
|
||||
if (!HaveSemi) OS << ";"; HaveSemi = true;
|
||||
OS << " dbg:";
|
||||
printDebugLoc(debugLoc, MF, OS);
|
||||
|
Loading…
Reference in New Issue
Block a user