[PGO] Simplify computehash interface (NFC)
[oota-llvm.git] / include / llvm / Support / ArrayRecycler.h
index 19059b32cd3af7c05baeb11ee284985481a337b9..36f644af288081e5e117efbcf44f92f92c23804b 100644 (file)
 #define LLVM_SUPPORT_ARRAYRECYCLER_H
 
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/Allocator.h"
 #include "llvm/Support/MathExtras.h"
 
 namespace llvm {
 
-class BumpPtrAllocator;
-
 /// Recycle small arrays allocated from a BumpPtrAllocator.
 ///
 /// Arrays are allocated in a small number of fixed sizes. For each supported
@@ -45,10 +44,10 @@ class ArrayRecycler {
   // Return NULL if no entries are available.
   T *pop(unsigned Idx) {
     if (Idx >= Bucket.size())
-      return 0;
+      return nullptr;
     FreeList *Entry = Bucket[Idx];
     if (!Entry)
-      return 0;
+      return nullptr;
     Bucket[Idx] = Entry->Next;
     return reinterpret_cast<T*>(Entry);
   }