[llvm-commits] [llvm] r163100 - /llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp

Chad Rosier mcrosier at apple.com
Sun Sep 2 18:55:12 PDT 2012


Author: mcrosier
Date: Sun Sep  2 20:55:11 2012
New Revision: 163100

URL: http://llvm.org/viewvc/llvm-project?rev=163100&view=rev
Log:
Move ErrorLoc decl into the scope where it's actually used.

Modified:
    llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp

Modified: llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp?rev=163100&r1=163099&r2=163100&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp Sun Sep  2 20:55:11 2012
@@ -317,7 +317,6 @@
                         SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                         MCStreamer &Out) {
   MCInst Inst;
-  SMLoc ErrorLoc;
   unsigned ErrorInfo;
 
   switch (MatchInstructionImpl(Operands, Inst, ErrorInfo)) {
@@ -330,7 +329,7 @@
   case Match_MnemonicFail:
       return Error(IDLoc, "unrecognized instruction mnemonic");
   case Match_InvalidOperand:
-    ErrorLoc = IDLoc;
+    SMLoc ErrorLoc = IDLoc;
     if (ErrorInfo != ~0U) {
       if (ErrorInfo >= Operands.size())
         return Error(IDLoc, "too few operands for instruction");





More information about the llvm-commits mailing list