summaryrefslogtreecommitdiff
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-13 04:57:38 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-13 04:57:38 +0000
commit4266ae806798f1e8982a53bb9babe1e508adfc68 (patch)
treed0a8021366191c2884dc07bfe73a2daee0b417c1 /include/llvm/ADT
parent4e510c10b5310cffe6c27fb49c7f7d170dc73639 (diff)
downloadllvm-4266ae806798f1e8982a53bb9babe1e508adfc68.tar.gz
llvm-4266ae806798f1e8982a53bb9babe1e508adfc68.tar.bz2
llvm-4266ae806798f1e8982a53bb9babe1e508adfc68.tar.xz
[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@206129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/ilist.h4
-rw-r--r--include/llvm/ADT/ilist_node.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/ADT/ilist.h b/include/llvm/ADT/ilist.h
index 4f64b6c82e..bc148452f2 100644
--- a/include/llvm/ADT/ilist.h
+++ b/include/llvm/ADT/ilist.h
@@ -83,7 +83,7 @@ struct ilist_sentinel_traits {
/// provideInitialHead - when constructing an ilist, provide a starting
/// value for its Head
/// @return null node to indicate that it needs to be allocated later
- static NodeTy *provideInitialHead() { return 0; }
+ static NodeTy *provideInitialHead() { return nullptr; }
/// ensureHead - make sure that Head is either already
/// initialized or assigned a fresh sentinel
@@ -92,7 +92,7 @@ struct ilist_sentinel_traits {
if (!Head) {
Head = ilist_traits<NodeTy>::createSentinel();
ilist_traits<NodeTy>::noteHead(Head, Head);
- ilist_traits<NodeTy>::setNext(Head, 0);
+ ilist_traits<NodeTy>::setNext(Head, nullptr);
return Head;
}
return ilist_traits<NodeTy>::getPrev(Head);
diff --git a/include/llvm/ADT/ilist_node.h b/include/llvm/ADT/ilist_node.h
index 269fa51958..51c0328bfb 100644
--- a/include/llvm/ADT/ilist_node.h
+++ b/include/llvm/ADT/ilist_node.h
@@ -60,7 +60,7 @@ public:
// Check for sentinel.
if (!Prev->getNext())
- return 0;
+ return nullptr;
return Prev;
}
@@ -82,7 +82,7 @@ public:
// Check for sentinel.
if (!Next->getNext())
- return 0;
+ return nullptr;
return Next;
}