Avoid TBAA issue.

llvm-svn: 34539
This commit is contained in:
Chris Lattner 2007-02-23 22:31:24 +00:00
parent 4938bb7268
commit 66330fdddb
1 changed files with 4 additions and 1 deletions

View File

@ -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 {