150
|
1 // Make SEH works in PCH
|
|
2 //
|
|
3 // Test this without pch.
|
|
4 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s
|
|
5
|
|
6 // Test with pch.
|
|
7 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s
|
|
8 // RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s
|
|
9
|
|
10 #ifndef HEADER
|
|
11 #define HEADER
|
|
12
|
|
13 int shouldCatch();
|
|
14 inline int f() {
|
|
15 __try {
|
|
16 } __except (shouldCatch()) {
|
|
17 }
|
|
18 return 0;
|
|
19 }
|
|
20 int x = f();
|
|
21
|
236
|
22 // CHECK: define linkonce_odr dso_local noundef i32 @"?f@@YAHXZ"()
|
|
23 // CHECK: define internal noundef i32 @"?filt$0@0@f@@"({{.*}})
|
150
|
24
|
|
25 #else
|
|
26
|
|
27 // empty
|
|
28
|
|
29 #endif
|