summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/ValueSymbolTable.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-09 06:08:46 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-09 06:08:46 +0000
commitc620761ca54a3076b28202c97e4702c2213419bd (patch)
tree1f38d9e163a7e7be2e67c946458cfcdf7dc464d0 /llvm/lib/IR/ValueSymbolTable.cpp
parent011817a0bf35b17fafa1ba7500511ec3468250ca (diff)
downloadbcm5719-llvm-c620761ca54a3076b28202c97e4702c2213419bd.tar.gz
bcm5719-llvm-c620761ca54a3076b28202c97e4702c2213419bd.zip
[C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 205831
Diffstat (limited to 'llvm/lib/IR/ValueSymbolTable.cpp')
-rw-r--r--llvm/lib/IR/ValueSymbolTable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/ValueSymbolTable.cpp b/llvm/lib/IR/ValueSymbolTable.cpp
index fffacb37777..d2fd547c87a 100644
--- a/llvm/lib/IR/ValueSymbolTable.cpp
+++ b/llvm/lib/IR/ValueSymbolTable.cpp
@@ -56,7 +56,7 @@ void ValueSymbolTable::reinsertValue(Value* V) {
// Try insert the vmap entry with this suffix.
ValueName &NewName = vmap.GetOrCreateValue(UniqueName);
- if (NewName.getValue() == 0) {
+ if (!NewName.getValue()) {
// Newly inserted name. Success!
NewName.setValue(V);
V->Name = &NewName;
@@ -78,7 +78,7 @@ void ValueSymbolTable::removeValueName(ValueName *V) {
ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) {
// In the common case, the name is not already in the symbol table.
ValueName &Entry = vmap.GetOrCreateValue(Name);
- if (Entry.getValue() == 0) {
+ if (!Entry.getValue()) {
Entry.setValue(V);
//DEBUG(dbgs() << " Inserted value: " << Entry.getKeyData() << ": "
// << *V << "\n");
@@ -95,7 +95,7 @@ ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) {
// Try insert the vmap entry with this suffix.
ValueName &NewName = vmap.GetOrCreateValue(UniqueName);
- if (NewName.getValue() == 0) {
+ if (!NewName.getValue()) {
// Newly inserted name. Success!
NewName.setValue(V);
//DEBUG(dbgs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
OpenPOWER on IntegriCloud