diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2010-11-29 01:41:13 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2010-11-29 01:41:13 +0000 |
commit | e89ada98a6ed803ca865843678c4dd4cf77b14ee (patch) | |
tree | c69ab038ce71619b7ccb23ff0bea7309b30c879e /lib/Analysis/InstructionSimplify.cpp | |
parent | 2f17bf2a4406d89b5e127306cbd0fc862e0a6bd5 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | lib/Analysis/InstructionSimplify.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index ac21a9ae20..87125191ad 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/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()); |