diff options
author | Reid Kleckner <rnk@google.com> | 2017-01-10 21:27:03 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-01-10 21:27:03 +0000 |
commit | 2930cafbf317ebd018434c54386bdb91e2ed2b49 (patch) | |
tree | 0709ca7b66789b9afc56c30bdbfe978b83e9e7d9 /test/PCH | |
parent | be15c6a8274d96827ac707e5075118d4c376940f (diff) | |
download | clang-2930cafbf317ebd018434c54386bdb91e2ed2b49.tar.gz |
Serialize the UsesSEH bit on FunctionDecl
Fixes PR31539
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/uses-seh.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/PCH/uses-seh.cpp b/test/PCH/uses-seh.cpp new file mode 100644 index 0000000000..6fbfc9766c --- /dev/null +++ b/test/PCH/uses-seh.cpp @@ -0,0 +1,29 @@ +// Make SEH works in PCH +// +// Test this without pch. +// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include %s -emit-llvm -o - %s | FileCheck %s + +// Test with pch. +// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s +// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s + +#ifndef HEADER +#define HEADER + +int shouldCatch(); +inline int f() { + __try { + } __except (shouldCatch()) { + } + return 0; +} +int x = f(); + +// CHECK: define linkonce_odr i32 @"\01?f@@YAHXZ"() +// CHECK: define internal i32 @"\01?filt$0@0@f@@"({{.*}}) + +#else + +// empty + +#endif |