diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-15 04:59:12 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-15 04:59:12 +0000 |
commit | 9f008867c063919762189487e78bcb7ace2b256d (patch) | |
tree | a768a65bc7a91c59f5d98aadbb7d827fdeb30ccd /llvm/lib/Analysis/SparsePropagation.cpp | |
parent | 4a7a0509102a0af018011d2708bf321fa6984596 (diff) | |
download | llvm-9f008867c063919762189487e78bcb7ace2b256d.zip llvm-9f008867c063919762189487e78bcb7ace2b256d.tar.gz llvm-9f008867c063919762189487e78bcb7ace2b256d.tar.bz2 |
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206243
Diffstat (limited to 'llvm/lib/Analysis/SparsePropagation.cpp')
-rw-r--r-- | llvm/lib/Analysis/SparsePropagation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/SparsePropagation.cpp b/llvm/lib/Analysis/SparsePropagation.cpp index 87a4fa4..90de884 100644 --- a/llvm/lib/Analysis/SparsePropagation.cpp +++ b/llvm/lib/Analysis/SparsePropagation.cpp @@ -147,7 +147,7 @@ void SparseSolver::getFeasibleSuccessors(TerminatorInst &TI, return; Constant *C = LatticeFunc->GetConstant(BCValue, BI->getCondition(), *this); - if (C == 0 || !isa<ConstantInt>(C)) { + if (!C || !isa<ConstantInt>(C)) { // Non-constant values can go either way. Succs[0] = Succs[1] = true; return; @@ -189,7 +189,7 @@ void SparseSolver::getFeasibleSuccessors(TerminatorInst &TI, return; Constant *C = LatticeFunc->GetConstant(SCValue, SI.getCondition(), *this); - if (C == 0 || !isa<ConstantInt>(C)) { + if (!C || !isa<ConstantInt>(C)) { // All destinations are executable! Succs.assign(TI.getNumSuccessors(), true); return; |