Move ErrorLoc decl into the scope where it's actually used.
authorChad Rosier <mcrosier@apple.com>
Mon, 3 Sep 2012 01:55:11 +0000 (01:55 +0000)
committerChad Rosier <mcrosier@apple.com>
Mon, 3 Sep 2012 01:55:11 +0000 (01:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163100 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp

index 94e71d159c3ce29a7500bcb217d651eea65cf967..70d0282519a494753a15628cd1e39ed61b8ee8d0 100644 (file)
@@ -317,7 +317,6 @@ MatchAndEmitInstruction(SMLoc IDLoc,
                         SmallVectorImpl<MCParsedAsmOperand*> &Operands,
                         MCStreamer &Out) {
   MCInst Inst;
-  SMLoc ErrorLoc;
   unsigned ErrorInfo;
 
   switch (MatchInstructionImpl(Operands, Inst, ErrorInfo)) {
@@ -330,7 +329,7 @@ MatchAndEmitInstruction(SMLoc IDLoc,
   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");