summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2015-04-24 23:27:32 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2015-04-24 23:27:32 +0000
commit8c794112034ebd20f9307e77988ab0cd46692527 (patch)
treec64b121e5748d7e7ecaacb1cd0967b6ee16ddc9f /llvm/lib
parentf60daf7ca209f72e239baf61e45ce206544de8e4 (diff)
downloadbcm5719-llvm-8c794112034ebd20f9307e77988ab0cd46692527.tar.gz
bcm5719-llvm-8c794112034ebd20f9307e77988ab0cd46692527.zip
[WinEH] Find correct cloned entry block for outlined handler functions.
llvm-svn: 235791
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/WinEHPrepare.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index 1325821d498..20f8acd6328 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -1723,7 +1723,8 @@ void WinEHPrepare::mapLandingPadBlocks(LandingPadInst *LPad,
// exceptions but code called from catches can. For SEH, it isn't
// important if some finally code before a catch-all is executed out of
// line or after recovering from the exception.
- if (Personality == EHPersonality::MSVC_CXX)
+ if (Personality == EHPersonality::MSVC_CXX && LPad->isCleanup() &&
+ !Actions->includesCleanup())
findCleanupHandlers(Actions, BB, BB);
// Add the catch handler to the action list.
OpenPOWER on IntegriCloud