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 | 570e52c6f17d8819ee4c8595fc79d17a6dc51dd9 (patch) | |
tree | 42d9d583e8f7da758a694b70ac754702aac50b7a /lib/Analysis/SparsePropagation.cpp | |
parent | a8ae0ad11fe5e8e649e3add7585a6ad235a27fad (diff) | |
download | llvm-570e52c6f17d8819ee4c8595fc79d17a6dc51dd9.tar.gz llvm-570e52c6f17d8819ee4c8595fc79d17a6dc51dd9.tar.bz2 llvm-570e52c6f17d8819ee4c8595fc79d17a6dc51dd9.tar.xz |
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206243 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SparsePropagation.cpp')
-rw-r--r-- | lib/Analysis/SparsePropagation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/SparsePropagation.cpp b/lib/Analysis/SparsePropagation.cpp index 87a4fa4e0c..90de884341 100644 --- a/lib/Analysis/SparsePropagation.cpp +++ b/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; |