mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Fix PR7545 crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -505,7 +505,6 @@ void X86AsmPrinter::PrintDebugValueComment(const MachineInstr *MI,
|
||||
O << V.getName();
|
||||
O << " <- ";
|
||||
// Frame address. Currently handles register +- offset only.
|
||||
assert(MI->getOperand(0).isReg() && MI->getOperand(3).isImm());
|
||||
O << '['; printOperand(MI, 0, O); O << '+'; printOperand(MI, 3, O);
|
||||
O << ']';
|
||||
O << "+";
|
||||
@@ -517,8 +516,9 @@ X86AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
|
||||
MachineLocation Location;
|
||||
assert (MI->getNumOperands() == 7 && "Invalid no. of machine operands!");
|
||||
// Frame address. Currently handles register +- offset only.
|
||||
assert(MI->getOperand(0).isReg() && MI->getOperand(3).isImm());
|
||||
Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm());
|
||||
|
||||
if (MI->getOperand(0).isReg() && MI->getOperand(3).isImm())
|
||||
Location.set(MI->getOperand(0).getReg(), MI->getOperand(3).getImm());
|
||||
return Location;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user