-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Windows SEH] Fix catch+return crash for Windows -EHa
This change also turns on -fasync-exceptions by default under -EHa option due to the backend patch merged. Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D147165
- Loading branch information
1 parent
52dd9de
commit 0cc66f3
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// RUN: %clang_cc1 -triple x86_64-windows -fasync-exceptions -fcxx-exceptions -fexceptions -fms-extensions -x c++ -Wno-implicit-function-declaration -S -emit-llvm %s -o - | FileCheck %s | ||
|
||
// CHECK: define dso_local void @"?foo@@YAXXZ | ||
// CHECK: invoke void @llvm.seh.try.begin() | ||
// CHECK-NOT: llvm.seh.scope.begin | ||
// CHECK-NOT: llvm.seh.scope.end | ||
|
||
// FIXME: Do we actually need llvm.seh.scope*? | ||
void foo() { | ||
try {} | ||
catch (...) { | ||
return; | ||
} | ||
} |