Fix Clang-tidy modernize-use-nullptr warnings in examples and include directories...
[oota-llvm.git] / include / llvm / Support / Registry.h
index 95c4e96f7f2995a0df08a47e006467cce3900736..2cb8f3c719fa9a451cf7a1d8fbdc2846ed4c0fc3 100644 (file)
@@ -37,7 +37,6 @@ namespace llvm {
     std::unique_ptr<T> instantiate() const { return Ctor(); }
   };
 
-
   /// Traits for registry entries. If using other than SimpleRegistryEntry, it
   /// is necessary to define an alternate traits class.
   template <typename T>
@@ -53,7 +52,6 @@ namespace llvm {
     static const char *descof(const entry &Entry) { return Entry.getDesc(); }
   };
 
-
   /// A global registry used in conjunction with static constructors to make
   /// pluggable components (like targets or garbage collectors) "just work" when
   /// linked with an executable.
@@ -102,7 +100,6 @@ namespace llvm {
       }
     };
 
-
     /// Iterators for registry entries.
     ///
     class iterator {
@@ -125,7 +122,6 @@ namespace llvm {
       return iterator_range<iterator>(begin(), end());
     }
 
-
     /// Abstract base class for registry listeners, which are informed when new
     /// entries are added to the registry. Simply subclass and instantiate:
     ///
@@ -160,7 +156,7 @@ namespace llvm {
       }
 
     public:
-      listener() : Prev(ListenerTail), Next(0) {
+      listener() : Prev(ListenerTail), Next(nullptr) {
         if (Prev)
           Prev->Next = this;
         else
@@ -180,7 +176,6 @@ namespace llvm {
       }
     };
 
-
     /// A static registration template. Use like such:
     ///
     ///   Registry<Collector>::Add<FancyGC>
@@ -210,7 +205,6 @@ namespace llvm {
     };
 
     /// Registry::Parser now lives in llvm/Support/RegistryParser.h.
-
   };
 
   // Since these are defined in a header file, plugins must be sure to export
@@ -228,6 +222,6 @@ namespace llvm {
   template <typename T, typename U>
   typename Registry<T,U>::listener *Registry<T,U>::ListenerTail;
 
-}
+} // end namespace llvm
 
-#endif
+#endif // LLVM_SUPPORT_REGISTRY_H