summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-23 22:31:24 +0000
committerChris Lattner <sabre@nondot.org>2007-02-23 22:31:24 +0000
commit66330fdddb5d4219e14f3eff611b0a46c4004897 (patch)
treeb58078871b5e4244ded1d64a698268eb4ae63bc0 /llvm/lib/Support
parent4938bb72682eb23e3445dabc2e2f8fc71cd9a5a2 (diff)
downloadbcm5719-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.cpp5
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 {
OpenPOWER on IntegriCloud