Fix uninitialized variable warning.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 29 Jun 2009 21:14:21 +0000 (21:14 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 29 Jun 2009 21:14:21 +0000 (21:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74457 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-mc/AsmParser.cpp

index 2248b046c2026dcf6d8be6840d1ec8b8a9ff53fa..9121797e814fce136716b9fdf33a4719ed122503 100644 (file)
@@ -218,7 +218,7 @@ static unsigned getBinOpPrecedence(asmtok::TokKind K,
 /// Res contains the LHS of the expression on input.
 bool AsmParser::ParseBinOpRHS(unsigned Precedence, AsmExpr *&Res) {
   while (1) {
-    AsmBinaryExpr::Opcode Kind;
+    AsmBinaryExpr::Opcode Kind = AsmBinaryExpr::Add;
     unsigned TokPrec = getBinOpPrecedence(Lexer.getKind(), Kind);
     
     // If the next token is lower precedence than we are allowed to eat, return