From 9717fa9f29696bca45ddfdf206b1c382c8b40b78 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 21 Nov 2010 10:56:05 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119937 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 4b21cc6d85b..7c34b58ec20 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -857,8 +857,11 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc, } 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) {