From d675b8347dd5f10496aa331811eed8d5e066f70d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 23 Feb 2007 22:31:24 +0000 Subject: [PATCH] Avoid TBAA issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34539 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Allocator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Support/Allocator.cpp b/lib/Support/Allocator.cpp index a31b80fcf35..234fd41b738 100644 --- a/lib/Support/Allocator.cpp +++ b/lib/Support/Allocator.cpp @@ -93,7 +93,10 @@ BumpPtrAllocator::~BumpPtrAllocator() { } void *BumpPtrAllocator::Allocate(unsigned Size, unsigned Align) { - return ((MemRegion*)TheMemory)->Allocate(Size, Align,(MemRegion**)&TheMemory); + MemRegion *MRP = (MemRegion*)TheMemory; + void *Ptr = MRP->Allocate(Size, Align, &MRP); + TheMemory = MRP; + return Ptr; } void BumpPtrAllocator::PrintStats() const { -- 2.11.0