aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-07-06 18:18:32 +0000
committerDevang Patel <dpatel@apple.com>2010-07-06 18:18:32 +0000
commitbe35be614cb21b5081741dc917a5969b7c5c068c (patch)
tree5c42e09cc83c4242f86cb7fc97789779fba61675 /lib
parent5ed9eee61aa8d87e8c2eaa2025bd7c73365fedbb (diff)
Fix PR7545 crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/AsmPrinter/X86MCInstLower.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
index 43c654e148..44c8a513c6 100644
--- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
+++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
@@ -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;
}