diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index dbc0d91a01e..d56a242f98c 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -833,7 +833,7 @@ bool WinEHPrepare::prepareExceptionHandlers( LoadInst *LI; if (auto *Phi = dyn_cast<PHINode>(I)) LI = new LoadInst(SEHExceptionCodeSlot, "sehcode", false, - Phi->getIncomingBlock(*U)); + Phi->getIncomingBlock(*U)->getTerminator()); else LI = new LoadInst(SEHExceptionCodeSlot, "sehcode", false, I); U->set(LI); |