mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
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:
@@ -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())
|
||||
|
Reference in New Issue
Block a user