]> granicus.if.org Git - llvm/commitdiff
[ARM, Asm] Remove dead code causing MSan failure.
authorOliver Stannard <oliver.stannard@arm.com>
Tue, 3 Oct 2017 12:28:28 +0000 (12:28 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Tue, 3 Oct 2017 12:28:28 +0000 (12:28 +0000)
r314779 caused ErrorInfo to be red uninitialised, but also made this code dead,
so it can just be removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314791 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmParser/ARMAsmParser.cpp

index f2925f176a1c960a65be37325a484151d177883c..c949d8954d533d8a7d64a17ce3de6c03132aed6a 100644 (file)
@@ -9028,13 +9028,6 @@ bool ARMAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
   MatchResult = MatchInstruction(Operands, Inst, NearMisses, MatchingInlineAsm,
                                  PendConditionalInstruction, Out);
 
-  SMLoc ErrorLoc;
-  if (ErrorInfo < Operands.size()) {
-    ErrorLoc = ((ARMOperand &)*Operands[ErrorInfo]).getStartLoc();
-    if (ErrorLoc == SMLoc())
-      ErrorLoc = IDLoc;
-  }
-
   switch (MatchResult) {
   case Match_Success:
     // Context sensitive operand constraints aren't handled by the matcher,