summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-02-11 01:23:16 +0000
committerReid Kleckner <reid@kleckner.net>2015-02-11 01:23:16 +0000
commit96d011315aa01de179897eaf4e7baeddc5de1cda (patch)
treeccced202122ff25d6362be653140bfe079ab5925 /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
parent58e985c2db3045f1416520212108f93c8c257b18 (diff)
downloadbcm5719-llvm-96d011315aa01de179897eaf4e7baeddc5de1cda.tar.gz
bcm5719-llvm-96d011315aa01de179897eaf4e7baeddc5de1cda.zip
Don't promote asynch EH invokes of nounwind functions to calls
If the landingpad of the invoke is using a personality function that catches asynch exceptions, then it can catch a trap. Also add some landingpads to invalid LLVM IR test cases that lack them. Over-the-shoulder reviewed by David Majnemer. llvm-svn: 228782
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 3cfcc90a8ed..ffc8ff5b16c 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2275,6 +2275,7 @@ static bool isCatchAll(EHPersonality Personality, Constant *TypeInfo) {
return false;
case EHPersonality::GNU_CXX:
case EHPersonality::GNU_ObjC:
+ case EHPersonality::MSVC_X86SEH:
case EHPersonality::MSVC_Win64SEH:
case EHPersonality::MSVC_CXX:
return TypeInfo->isNullValue();
@@ -2293,7 +2294,7 @@ Instruction *InstCombiner::visitLandingPadInst(LandingPadInst &LI) {
// The logic here should be correct for any real-world personality function.
// However if that turns out not to be true, the offending logic can always
// be conditioned on the personality function, like the catch-all logic is.
- EHPersonality Personality = ClassifyEHPersonality(LI.getPersonalityFn());
+ EHPersonality Personality = classifyEHPersonality(LI.getPersonalityFn());
// Simplify the list of clauses, eg by removing repeated catch clauses
// (these are often created by inlining).
OpenPOWER on IntegriCloud