Debug info: Store the DIVariable in DebugLocEntry also for constants,

so DwarfDebug::emitDebugLocEntry can emit them with the correct signedness.

rdar://problem/15928306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl
2014-04-11 17:49:47 +00:00
parent d879166376
commit c6db0bdef2
5 changed files with 17 additions and 15 deletions
+5 -3
View File
@@ -1212,11 +1212,13 @@ static DebugLocEntry getDebugLocEntry(AsmPrinter *Asm,
return DebugLocEntry(FLabel, SLabel, MLoc, Var, Unit);
}
if (MI->getOperand(0).isImm())
return DebugLocEntry(FLabel, SLabel, MI->getOperand(0).getImm(), Unit);
return DebugLocEntry(FLabel, SLabel, MI->getOperand(0).getImm(), Var, Unit);
if (MI->getOperand(0).isFPImm())
return DebugLocEntry(FLabel, SLabel, MI->getOperand(0).getFPImm(), Unit);
return DebugLocEntry(FLabel, SLabel, MI->getOperand(0).getFPImm(),
Var, Unit);
if (MI->getOperand(0).isCImm())
return DebugLocEntry(FLabel, SLabel, MI->getOperand(0).getCImm(), Unit);
return DebugLocEntry(FLabel, SLabel, MI->getOperand(0).getCImm(),
Var, Unit);
llvm_unreachable("Unexpected 3 operand DBG_VALUE instruction!");
}