From: Chad Rosier Date: Mon, 3 Sep 2012 01:55:11 +0000 (+0000) Subject: Move ErrorLoc decl into the scope where it's actually used. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61290e3845a9cae85f26468e4367a598c0f3f6c1;p=oota-llvm.git Move ErrorLoc decl into the scope where it's actually used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163100 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp index 94e71d159c3..70d0282519a 100644 --- a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp +++ b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp @@ -317,7 +317,6 @@ MatchAndEmitInstruction(SMLoc IDLoc, SmallVectorImpl &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");