summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-11-29 01:41:13 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-11-29 01:41:13 +0000
commitabcab28f9b96356c0db3315116e44af76d044970 (patch)
tree4a82627411c1a8f81c7b81956186e059a1fc3e18 /llvm/lib/Analysis
parentc66906a6cb888d6f89af3c3a9dbd7c62d0befbb9 (diff)
downloadbcm5719-llvm-abcab28f9b96356c0db3315116e44af76d044970.tar.gz
bcm5719-llvm-abcab28f9b96356c0db3315116e44af76d044970.zip
Add some dead stores to pacify my least favorite GCC warning: may be
uninitialized. The warning is terrible, has incorrect source locations, and has a huge false positive rate such as *all* of these. If anyone has a better solution, please let me know. Alternatively, I'll happily add -Wno-uninitialized to the -Werror build mode. Maybe I can even do it *only* when building with GCC instead of Clang. llvm-svn: 120281
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index ac21a9ae20b..87125191ad0 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -298,7 +298,7 @@ static Value *SimplifyAndInst(Value *Op0, Value *Op1, const TargetData *TD,
return Op0;
// A & ~A = ~A & A = 0
- Value *A, *B;
+ Value *A = 0, *B = 0;
if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
(match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getNullValue(Op0->getType());
@@ -377,7 +377,7 @@ static Value *SimplifyOrInst(Value *Op0, Value *Op1, const TargetData *TD,
return Op1;
// A | ~A = ~A | A = -1
- Value *A, *B;
+ Value *A = 0, *B = 0;
if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
(match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getAllOnesValue(Op0->getType());
@@ -452,7 +452,7 @@ static Value *SimplifyXorInst(Value *Op0, Value *Op1, const TargetData *TD,
return Constant::getNullValue(Op0->getType());
// A ^ ~A = ~A ^ A = -1
- Value *A, *B;
+ Value *A = 0, *B = 0;
if ((match(Op0, m_Not(m_Value(A))) && A == Op1) ||
(match(Op1, m_Not(m_Value(A))) && A == Op0))
return Constant::getAllOnesValue(Op0->getType());
OpenPOWER on IntegriCloud