[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / msvc_pragma_alloc_text.cpp
blobf53b54c26b8ce493d0bfc4291a38e2372d468737
1 // RUN: %clang_cc1 -fms-extensions -emit-llvm -o - %s | FileCheck %s
3 extern "C" {
5 void foo();
6 void foo1();
7 void foo2();
8 void foo3();
10 #pragma alloc_text("abc", foo, foo1)
11 #pragma alloc_text("def", foo2)
12 #pragma alloc_text("def", foo3)
14 // CHECK-LABEL: define{{.*}} void @foo() {{.*}} section "abc"
15 void foo() {}
17 // CHECK-LABEL: define{{.*}} void @foo1() {{.*}} section "abc"
18 void foo1() {}
20 // CHECK-LABEL: define{{.*}} void @foo2() {{.*}} section "def"
21 void foo2() {}
23 // CHECK-LABEL: define{{.*}} void @foo3() {{.*}} section "def"
24 void foo3() {}