OSDN Git Service

[WinEH] Find correct cloned entry block for outlined handler functions.
authorAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 24 Apr 2015 23:27:32 +0000 (23:27 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 24 Apr 2015 23:27:32 +0000 (23:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235791 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/WinEHPrepare.cpp

index 1325821..20f8acd 100644 (file)
@@ -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.