summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/Passes.cpp
diff options
context:
space:
mode:
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