OSDN Git Service

Pacify a noisy compiler, and sink this variable declaration closer to its uses.
authorNick Lewycky <nicholas@mxc.ca>
Thu, 30 Sep 2010 21:04:13 +0000 (21:04 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 30 Sep 2010 21:04:13 +0000 (21:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115206 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLParser.cpp

index c4fce2b..9efa772 100644 (file)
@@ -1131,7 +1131,6 @@ bool LLParser::ParseInstructionMetadata(Instruction *Inst,
     Lex.Lex();
 
     MDNode *Node;
-    unsigned NodeID;
     SMLoc Loc = Lex.getLoc();
 
     if (ParseToken(lltok::exclaim, "expected '!' here"))
@@ -1148,6 +1147,7 @@ bool LLParser::ParseInstructionMetadata(Instruction *Inst,
       assert(ID.Kind == ValID::t_MDNode);
       Inst->setMetadata(MDK, ID.MDNodeVal);
     } else {
+      unsigned NodeID = 0;
       if (ParseMDNodeID(Node, NodeID))
         return true;
       if (Node) {