[llvm-commits] [llvm] r74529 - /llvm/trunk/tools/llvm-mc/AsmExpr.cpp

Daniel Dunbar daniel at zuster.org
Tue Jun 30 09:03:04 PDT 2009


Author: ddunbar
Date: Tue Jun 30 11:02:47 2009
New Revision: 74529

URL: http://llvm.org/viewvc/llvm-project?rev=74529&view=rev
Log:
Suppress may-be-used-uninitialized warning.

Modified:
    llvm/trunk/tools/llvm-mc/AsmExpr.cpp

Modified: llvm/trunk/tools/llvm-mc/AsmExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/AsmExpr.cpp?rev=74529&r1=74528&r2=74529&view=diff

==============================================================================
--- llvm/trunk/tools/llvm-mc/AsmExpr.cpp (original)
+++ llvm/trunk/tools/llvm-mc/AsmExpr.cpp Tue Jun 30 11:02:47 2009
@@ -132,7 +132,8 @@
     // 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;





More information about the llvm-commits mailing list