mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
processStore may delete the instruction, avoid
using dyn_cast<> on already freed memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50618 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d9dc7d176
commit
529bd53411
@ -718,8 +718,7 @@ bool MemCpyOpt::iterateOnFunction(Function &F) {
|
||||
|
||||
if (StoreInst *SI = dyn_cast<StoreInst>(I))
|
||||
changed_function |= processStore(SI, BI);
|
||||
|
||||
if (MemCpyInst* M = dyn_cast<MemCpyInst>(I)) {
|
||||
else if (MemCpyInst* M = dyn_cast<MemCpyInst>(I)) {
|
||||
changed_function |= processMemCpy(M);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user