diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-02-23 22:31:24 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-02-23 22:31:24 +0000 |
| commit | 66330fdddb5d4219e14f3eff611b0a46c4004897 (patch) | |
| tree | b58078871b5e4244ded1d64a698268eb4ae63bc0 /llvm/lib/Support | |
| parent | 4938bb72682eb23e3445dabc2e2f8fc71cd9a5a2 (diff) | |
| download | bcm5719-llvm-66330fdddb5d4219e14f3eff611b0a46c4004897.tar.gz bcm5719-llvm-66330fdddb5d4219e14f3eff611b0a46c4004897.zip | |
Avoid TBAA issue.
llvm-svn: 34539
Diffstat (limited to 'llvm/lib/Support')
| -rw-r--r-- | llvm/lib/Support/Allocator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp index a31b80fcf35..234fd41b738 100644 --- a/llvm/lib/Support/Allocator.cpp +++ b/llvm/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 { |

