30 lines · cpp
1// Make SEH works in PCH2//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 %s5 6// Test with pch.7// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -emit-pch -o %t %s8// RUN: %clang_cc1 -fms-extensions -triple x86_64-windows-msvc -std=c++11 -include-pch %t -emit-llvm -o - %s | FileCheck %s9 10#ifndef HEADER11#define HEADER12 13int shouldCatch();14inline int f() {15 __try {16 } __except (shouldCatch()) {17 }18 return 0;19}20int x = f();21 22// CHECK: define linkonce_odr dso_local noundef i32 @"?f@@YAHXZ"()23// CHECK: define internal noundef i32 @"?filt$0@0@f@@"({{.*}})24 25#else26 27// empty28 29#endif30