Files
clang-p2996/clang/test/CodeGen/windows-seh-EHa-CppCatchReturn.cpp
Fangrui Song c5de4dd1ea [test] %clang_cc1 -emit-llvm: remove redundant -S
And replace -emit-llvm -o - with -emit-llvm-only
2024-05-04 17:00:29 -07:00

32 lines
763 B
C++

// RUN: %clang_cc1 -triple x86_64-windows -fasync-exceptions -fcxx-exceptions -fexceptions -fms-extensions -x c++ -Wno-implicit-function-declaration -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;
}
}
__declspec(noreturn) void bar();
class baz {
public:
~baz();
};
// CHECK: define dso_local void @"?qux@@YAXXZ
// CHECK: invoke void @llvm.seh.scope.begin()
// CHECK-NOT: llvm.seh.try
// CHECK-NOT: llvm.seh.scope.end
// We don't need to generate llvm.seh.scope.end for unreachable.
void qux() {
baz a;
bar();
}