]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenCXX/microsoft-abi-eh-terminate.cpp
Vendor import of clang trunk r238337:
[FreeBSD/FreeBSD.git] / test / CodeGenCXX / microsoft-abi-eh-terminate.cpp
1 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=18.00 | FileCheck -check-prefix=MSVC2013 %s
2 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=19.00 | FileCheck -check-prefix=MSVC2015 %s
3
4 void may_throw();
5 void never_throws() noexcept(true) {
6   may_throw();
7 }
8
9 // CHECK-LABEL: define void @"\01?never_throws@@YAXXZ"
10 // CHECK:      invoke void @"\01?may_throw@@YAXXZ"()
11
12 // CHECK:      landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
13 // MSVC2013:   call void @"\01?terminate@@YAXXZ"()
14 // MSVC2015:   call void @__std_terminate()
15 // CHECK-NEXT: unreachable