diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-06-18 17:37:34 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-06-18 17:37:34 +0000 |
commit | 4b828e6384e1e6c9936130dd9fe805c2140b05fc (patch) | |
tree | 9c286f3d73a34ab2bcdae74c659a2aa0623249a1 /lib/Transforms | |
parent | 8a207c16d2eb44ebcf94b13b0db047e46b7b0d30 (diff) |
Clean up some uninitialized variables and missing return statements that
GCC 4.0.0 compiler (sometimes incorrectly) warns about under release build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 83998c8bc2..55dd09846e 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -757,7 +757,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) { return BinaryOperator::createNot(Op1); // C - ~X == X + (1+C) - Value *X; + Value *X = 0; if (match(Op1, m_Not(m_Value(X)))) return BinaryOperator::createAdd(X, ConstantExpr::getAdd(C, ConstantInt::get(I.getType(), 1))); @@ -852,7 +852,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) { ConstantExpr::getNeg(DivRHS)); // X - X*C --> X * (1-C) - ConstantInt *C2; + ConstantInt *C2 = 0; if (dyn_castFoldableMul(Op1I, C2) == Op0) { Constant *CP1 = ConstantExpr::getSub(ConstantInt::get(I.getType(), 1), C2); @@ -5129,7 +5129,7 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) { Instruction *InstCombiner::visitBranchInst(BranchInst &BI) { // Change br (not X), label True, label False to: br X, label False, True - Value *X; + Value *X = 0; BasicBlock *TrueDest; BasicBlock *FalseDest; if (match(&BI, m_Br(m_Not(m_Value(X)), TrueDest, FalseDest)) && |