aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-05 20:02:51 +0000
committerChris Lattner <sabre@nondot.org>2006-09-05 20:02:51 +0000
commit67942f5dc30be1810f983aba8c94c49ca44e8634 (patch)
tree8f9d46ba075fe0c65d05ca251d9413f836dc08ca
parent04957ac67c32538c6a1a9b4eddad65b4ad734b66 (diff)
Don't call isDef on non-registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30117 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 266f82a091..9414e69b4c 100644
--- a/lib/CodeGen/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter.cpp
@@ -647,7 +647,8 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
// Count the number of register definitions.
unsigned NumDefs = 0;
- for (; MI->getOperand(NumDefs).isDef(); ++NumDefs)
+ for (; MI->getOperand(NumDefs).isReg() && MI->getOperand(NumDefs).isDef();
+ ++NumDefs)
assert(NumDefs != NumOperands-1 && "No asm string?");
assert(MI->getOperand(NumDefs).isExternalSymbol() && "No asm string?");