2018-02-09 08:16:41 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc \
|
|
|
|
// RUN: -fexceptions -fcxx-exceptions | FileCheck %s
|
|
|
|
|
|
|
|
// Make sure calls to inline asm have funclet bundles.
|
|
|
|
|
|
|
|
extern "C" void might_throw();
|
|
|
|
extern "C" void foo() {
|
|
|
|
try {
|
|
|
|
might_throw();
|
|
|
|
} catch (int) {
|
|
|
|
__asm__("nop");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK-LABEL: define dso_local void @foo()
|
2018-02-09 08:16:41 +08:00
|
|
|
// CHECK: invoke void @might_throw()
|
|
|
|
// CHECK: %[[CATCHPAD:[^ ]*]] = catchpad within
|
|
|
|
// CHECK: call void asm sideeffect "nop", {{.*}} [ "funclet"(token %[[CATCHPAD]]) ]
|