projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3479d18
)
Grab an LLVM Context from an instruction that exists rather than one
author
Dan Gohman
<gohman@apple.com>
Sun, 27 Sep 2009 16:10:30 +0000
(16:10 +0000)
committer
Dan Gohman
<gohman@apple.com>
Sun, 27 Sep 2009 16:10:30 +0000
(16:10 +0000)
that is deleted in some situations. This fixes a use-after-free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82903
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LICM.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LICM.cpp
b/lib/Transforms/Scalar/LICM.cpp
index fe37ab4caa1b9ba8916184f7aa8f88217e939d78..6df246fa80e3d1ade9bbb61c7c0834003a721f13 100644
(file)
--- a/
lib/Transforms/Scalar/LICM.cpp
+++ b/
lib/Transforms/Scalar/LICM.cpp
@@
-593,7
+593,7
@@
void LICM::sink(Instruction &I) {
if (AI) {
std::vector<AllocaInst*> Allocas;
Allocas.push_back(AI);
- PromoteMemToReg(Allocas, *DT, *DF,
I.
getContext(), CurAST);
+ PromoteMemToReg(Allocas, *DT, *DF,
AI->
getContext(), CurAST);
}
}
}