summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/Passes.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-03-12 00:36:20 +0000
committerReid Kleckner <reid@kleckner.net>2015-03-12 00:36:20 +0000
commit47c8e7a0e7fa612363d727aa9db45d6b647b1d49 (patch)
tree2657f999d4113601de379fb126d819ddb83912c3 /llvm/lib/CodeGen/Passes.cpp
parent6e7908ddb7538ff9a6f49aecaa6b603f98cb423e (diff)
downloadbcm5719-llvm-47c8e7a0e7fa612363d727aa9db45d6b647b1d49.tar.gz
bcm5719-llvm-47c8e7a0e7fa612363d727aa9db45d6b647b1d49.zip
Stop calling DwarfEHPrepare from WinEHPrepare
Instead, run both EH preparation passes, and have them both ignore functions with unrecognized EH personalities. Pass delegation involved some hacky code for creating an AnalysisResolver that we don't need now. llvm-svn: 231995
Diffstat (limited to 'llvm/lib/CodeGen/Passes.cpp')
-rw-r--r--llvm/lib/CodeGen/Passes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/Passes.cpp b/llvm/lib/CodeGen/Passes.cpp
index d692862adf4..4fbc4c97307 100644
--- a/llvm/lib/CodeGen/Passes.cpp
+++ b/llvm/lib/CodeGen/Passes.cpp
@@ -422,7 +422,11 @@ void TargetPassConfig::addPassesToHandleExceptions() {
addPass(createDwarfEHPass(TM));
break;
case ExceptionHandling::WinEH:
+ // We support using both GCC-style and MSVC-style exceptions on Windows, so
+ // add both preparation passes. Each pass will only actually run if it
+ // recognizes the personality function.
addPass(createWinEHPass(TM));
+ addPass(createDwarfEHPass(TM));
break;
case ExceptionHandling::None:
addPass(createLowerInvokePass());
OpenPOWER on IntegriCloud