X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FImmutableList.h;h=a1d26bd97045e0ea296e216a796704093cea65dc;hb=d16725c31fbb40fcbf0cdf68b2b417ba445c5140;hp=748d3e4bf9ffea05e6bce9247c7426d4d6eaca46;hpb=23662fba704e684f24d3114bb399c80d5c0afbd9;p=oota-llvm.git diff --git a/include/llvm/ADT/ImmutableList.h b/include/llvm/ADT/ImmutableList.h index 748d3e4bf9f..a1d26bd9704 100644 --- a/include/llvm/ADT/ImmutableList.h +++ b/include/llvm/ADT/ImmutableList.h @@ -28,7 +28,7 @@ class ImmutableListImpl : public FoldingSetNode { T Head; const ImmutableListImpl* Tail; - ImmutableListImpl(const T& head, const ImmutableListImpl* tail = 0) + ImmutableListImpl(const T& head, const ImmutableListImpl* tail = nullptr) : Head(head), Tail(tail) {} friend class ImmutableListFactory; @@ -72,7 +72,7 @@ public: // This constructor should normally only be called by ImmutableListFactory. // There may be cases, however, when one needs to extract the internal pointer // and reconstruct a list object from that pointer. - ImmutableList(const ImmutableListImpl* x = 0) : X(x) {} + ImmutableList(const ImmutableListImpl* x = nullptr) : X(x) {} const ImmutableListImpl* getInternalPointer() const { return X; @@ -81,7 +81,7 @@ public: class iterator { const ImmutableListImpl* L; public: - iterator() : L(0) {} + iterator() : L(nullptr) {} iterator(ImmutableList l) : L(l.getInternalPointer()) {} iterator& operator++() { L = L->getTail(); return *this; } @@ -128,7 +128,7 @@ public: /// getTail - Returns the tail of the list, which is another (possibly empty) /// ImmutableList. ImmutableList getTail() { - return X ? X->getTail() : 0; + return X ? X->getTail() : nullptr; } void Profile(FoldingSetNodeID& ID) const { @@ -190,7 +190,7 @@ public: } ImmutableList getEmptyList() const { - return ImmutableList(0); + return ImmutableList(nullptr); } ImmutableList create(const T& X) { @@ -226,4 +226,4 @@ struct isPodLike > { static const bool value = true; }; } // end llvm namespace -#endif +#endif // LLVM_ADT_IMMUTABLELIST_H