summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/AllocatorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Support/AllocatorTest.cpp')
-rw-r--r--llvm/unittests/Support/AllocatorTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Support/AllocatorTest.cpp b/llvm/unittests/Support/AllocatorTest.cpp
index a0223ea932b..8a07ddda130 100644
--- a/llvm/unittests/Support/AllocatorTest.cpp
+++ b/llvm/unittests/Support/AllocatorTest.cpp
@@ -145,8 +145,8 @@ public:
void *Allocate(size_t Size, size_t /*Alignment*/) {
// Allocate space for the alignment, the slab, and a void* that goes right
// before the slab.
- size_t Alignment = 4096;
- void *MemBase = safe_malloc(Size + Alignment - 1 + sizeof(void*));
+ Align Alignment(4096);
+ void *MemBase = safe_malloc(Size + Alignment.value() - 1 + sizeof(void *));
// Find the slab start.
void *Slab = (void *)alignAddr((char*)MemBase + sizeof(void *), Alignment);
OpenPOWER on IntegriCloud