[C++11] Make use of 'nullptr' in the Support library.
[oota-llvm.git] / include / llvm / ADT / StringRef.h
index 0514d7b1964818312bfafbcb3b7c941da22d5fe1..d306b399faf0737097f58c56913070df48c89069 100644 (file)
@@ -70,7 +70,7 @@ namespace llvm {
     /// @{
 
     /// Construct an empty string ref.
-    /*implicit*/ StringRef() : Data(0), Length(0) {}
+    /*implicit*/ StringRef() : Data(nullptr), Length(0) {}
 
     /// Construct a string ref from a cstring.
     /*implicit*/ StringRef(const char *Str)
@@ -186,7 +186,7 @@ namespace llvm {
 
     /// str - Get the contents as an std::string.
     std::string str() const {
-      if (Data == 0) return std::string();
+      if (Data == nullptr) return std::string();
       return std::string(Data, Length);
     }