Suppress may-be-used-uninitialized warning.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 30 Jun 2009 16:02:47 +0000 (16:02 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 30 Jun 2009 16:02:47 +0000 (16:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74529 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-mc/AsmExpr.cpp

index 868cd0d040d31c30ddcf2398dd5328706db1acbf..3c19be308b60fad43f8b8fc87180702ed91d96bf 100644 (file)
@@ -132,7 +132,8 @@ bool AsmExpr::EvaluateAsRelocatable(MCContext &Ctx, MCValue &Res) const {
     // FIXME: We need target hooks for the evaluation. It may be limited in
     // width, and gas defines the result of comparisons differently from Apple
     // as (the result is sign extended).
-    int64_t Result, LHS = LHSValue.getConstant(), RHS = RHSValue.getConstant();
+    int64_t LHS = LHSValue.getConstant(), RHS = RHSValue.getConstant();
+    int64_t Result = 0;
     switch (ABE->getOpcode()) {
     case AsmBinaryExpr::Add:  Result = LHS + RHS; break;
     case AsmBinaryExpr::And:  Result = LHS & RHS; break;