mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
[C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user