diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 16:02:47 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 16:02:47 +0000 |
commit | b79742cd471b06a2c44ac1d247cd1e6d5dc123c2 (patch) | |
tree | f94228344516a507d8f576988c8c5f66100aff89 | |
parent | 892b507f7cf6611619db45077f364dc4d3b79ca9 (diff) |
Suppress may-be-used-uninitialized warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74529 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/llvm-mc/AsmExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-mc/AsmExpr.cpp b/tools/llvm-mc/AsmExpr.cpp index 868cd0d040..3c19be308b 100644 --- a/tools/llvm-mc/AsmExpr.cpp +++ b/tools/llvm-mc/AsmExpr.cpp @@ -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; |