The "trap" instruction is one of this which doesn't have a condition code. Hack
the code to not add a "condition code" if it's trap.
llvm-svn: 119937
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 4b21cc6..7c34b58 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -857,8 +857,11 @@
}
Operands.push_back(ARMOperand::CreateToken(Head, NameLoc));
- // FIXME: Should only add this operand for predicated instructions
- Operands.push_back(ARMOperand::CreateCondCode(ARMCC::CondCodes(CC), NameLoc));
+
+ if (Head != "trap")
+ // FIXME: Should only add this operand for predicated instructions
+ Operands.push_back(ARMOperand::CreateCondCode(ARMCC::CondCodes(CC),
+ NameLoc));
// Add the remaining tokens in the mnemonic.
while (Next != StringRef::npos) {