diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-15 06:32:26 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-15 06:32:26 +0000 |
commit | 2617dccea2721fd74677f0a7bcf5a768238421d0 (patch) | |
tree | ad5ee2efaff543d7da11f1599bdabb6588d1c1dd /llvm/lib/IR/Constants.cpp | |
parent | d82d4cc3567e896fad35372adba9a676c7776cd0 (diff) | |
download | bcm5719-llvm-2617dccea2721fd74677f0a7bcf5a768238421d0.tar.gz bcm5719-llvm-2617dccea2721fd74677f0a7bcf5a768238421d0.zip |
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206252
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index c28d16af383..8072bbcedcf 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -1354,7 +1354,7 @@ void UndefValue::destroyConstant() { // BlockAddress *BlockAddress::get(BasicBlock *BB) { - assert(BB->getParent() != 0 && "Block must have a parent"); + assert(BB->getParent() && "Block must have a parent"); return get(BB->getParent(), BB); } @@ -1381,7 +1381,7 @@ BlockAddress *BlockAddress::lookup(const BasicBlock *BB) { return nullptr; const Function *F = BB->getParent(); - assert(F != 0 && "Block must have a parent"); + assert(F && "Block must have a parent"); BlockAddress *BA = F->getContext().pImpl->BlockAddresses.lookup(std::make_pair(F, BB)); assert(BA && "Refcount and block address map disagree!"); |