summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2016-03-02 20:27:29 +0000
committerDaniel Berlin <dberlin@dberlin.org>2016-03-02 20:27:29 +0000
commit27ed1c2eb0f8a9a2539cd0762b28a77f665ca510 (patch)
tree180176ec05a4539dde1c6e2fe2c9cb8de49632a5 /llvm/lib/Transforms/Utils
parent9ab86aabbafe424de527bb5ddd07d2cdbd71c9cf (diff)
downloadbcm5719-llvm-27ed1c2eb0f8a9a2539cd0762b28a77f665ca510.tar.gz
bcm5719-llvm-27ed1c2eb0f8a9a2539cd0762b28a77f665ca510.zip
Fix ASAN detected errors in code and test
llvm-svn: 262511
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/MemorySSA.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/MemorySSA.cpp b/llvm/lib/Transforms/Utils/MemorySSA.cpp
index 8013b4a4c7b..f7dc7444d4a 100644
--- a/llvm/lib/Transforms/Utils/MemorySSA.cpp
+++ b/llvm/lib/Transforms/Utils/MemorySSA.cpp
@@ -231,7 +231,7 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
assert(!this->AA && !this->DT &&
"MemorySSA without a walker already has AA or DT?");
- auto *Result = new CachingMemorySSAWalker(this, AA, DT);
+ Walker = new CachingMemorySSAWalker(this, AA, DT);
this->AA = AA;
this->DT = DT;
@@ -343,7 +343,7 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
for (auto &MA : *Accesses) {
if (auto *MU = dyn_cast<MemoryUse>(&MA)) {
Instruction *Inst = MU->getMemoryInst();
- MU->setDefiningAccess(Result->getClobberingMemoryAccess(Inst));
+ MU->setDefiningAccess(Walker->getClobberingMemoryAccess(Inst));
}
}
}
@@ -354,7 +354,6 @@ MemorySSAWalker *MemorySSA::buildMemorySSA(AliasAnalysis *AA,
if (!Visited.count(&BB))
markUnreachableAsLiveOnEntry(&BB);
- Walker = Result;
return Walker;
}
OpenPOWER on IntegriCloud