mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
Grab an LLVM Context from an instruction that exists rather than one
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
This commit is contained in:
parent
3479d18b98
commit
f37cfed791
@ -593,7 +593,7 @@ void LICM::sink(Instruction &I) {
|
|||||||
if (AI) {
|
if (AI) {
|
||||||
std::vector<AllocaInst*> Allocas;
|
std::vector<AllocaInst*> Allocas;
|
||||||
Allocas.push_back(AI);
|
Allocas.push_back(AI);
|
||||||
PromoteMemToReg(Allocas, *DT, *DF, I.getContext(), CurAST);
|
PromoteMemToReg(Allocas, *DT, *DF, AI->getContext(), CurAST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user