Remove code for setting the VEX L-bit as a function of operand size from the code...
[oota-llvm.git] / lib / Support / Allocator.cpp
index 215b0f249d96f82cda56763998be5326fae3569e..b8978302e7460bf54e99143ade7441d7378e8696 100644 (file)
@@ -22,8 +22,8 @@ namespace llvm {
 
 BumpPtrAllocator::BumpPtrAllocator(size_t size, size_t threshold,
                                    SlabAllocator &allocator)
-    : SlabSize(size), SizeThreshold(threshold), Allocator(allocator),
-      CurSlab(0), BytesAllocated(0) { }
+    : SlabSize(size), SizeThreshold(std::min(size, threshold)),
+      Allocator(allocator), CurSlab(0), BytesAllocated(0) { }
 
 BumpPtrAllocator::~BumpPtrAllocator() {
   DeallocateSlabs(CurSlab);