[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / unwind-inline-asm.cpp
blob725b0431fc7bc13e6af891127a8c5758ddc81c72
1 // RUN: %clang_cc1 -triple x86_64-unknown-linux -emit-llvm -DUNWIND -fcxx-exceptions -fexceptions -o - %s | FileCheck -check-prefixes CHECK,CHECK-UNWIND %s
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux -emit-llvm -fcxx-exceptions -fexceptions -o - %s | FileCheck -check-prefixes CHECK,CHECK-NO-UNWIND %s
4 extern "C" void printf(const char *fmt, ...);
6 struct DropBomb {
7 bool defused = false;
9 ~DropBomb() {
10 if (defused) {
11 return;
13 printf("Boom!\n");
17 extern "C" void trap() {
18 throw "Trap";
21 // CHECK: define dso_local void @test()
22 extern "C" void test() {
23 DropBomb bomb;
24 // CHECK-UNWIND: invoke void asm sideeffect unwind "call trap"
25 // CHECK-NO-UNWIND: call void asm sideeffect "call trap"
26 #ifdef UNWIND
27 asm volatile("call trap" ::
28 : "unwind");
29 #else
30 asm volatile("call trap" ::
31 :);
32 #endif
33 bomb.defused = true;