Move ErrorLoc decl into the scope where it's actually used.

llvm-svn: 163100
This commit is contained in:
Chad Rosier 2012-09-03 01:55:11 +00:00
parent 102f85655f
commit 10f14bcbda
1 changed files with 1 additions and 2 deletions

View 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");