From 67942f5dc30be1810f983aba8c94c49ca44e8634 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Sep 2006 20:02:51 +0000 Subject: [PATCH] Don't call isDef on non-registers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30117 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 266f82a0916..9414e69b4ce 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?"); -- 2.34.1