Cleanup and document MachineLocation.

Clarify documentation and API to make the difference between register and
register-indirect addressed locations more explicit. Put in a comment
to point out that with the current implementation we cannot specify
a register-indirect location with offset 0 (a breg 0 in DWARF).
No functionality change intended.

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl
2013-04-26 21:57:17 +00:00
parent f1d9fe9d04
commit 13131e62fc
3 changed files with 15 additions and 4 deletions

View File

@@ -1131,7 +1131,13 @@ static DotDebugLocEntry getDebugLocEntry(AsmPrinter *Asm,
}
if (MI->getOperand(0).isReg() && MI->getOperand(1).isImm()) {
MachineLocation MLoc;
MLoc.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm());
// TODO: Currently an offset of 0 in a DBG_VALUE means
// we need to generate a direct register value.
// There is no way to specify an indirect value with offset 0.
if (MI->getOperand(1).getImm() == 0)
MLoc.set(MI->getOperand(0).getReg());
else
MLoc.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm());
return DotDebugLocEntry(FLabel, SLabel, MLoc, Var);
}
if (MI->getOperand(0).isImm())