blob: d9ff1f955d2ef1f94d216781d9fe69fbaa1edea8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// RUN: %clang -target x86_64-linux-gnu -fsplit-stack -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-SEGSTK %s
// RUN: %clang -target x86_64-linux-gnu -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-NOSEGSTK %s
int foo() {
return 0;
}
__attribute__((no_split_stack))
int nosplit() {
return 0;
}
int main() {
return foo();
}
// CHECK-SEGSTK: define dso_local i32 @foo() [[SS:#[0-9]+]] {
// CHECK-SEGSTK: define dso_local i32 @nosplit() [[NSS:#[0-9]+]] {
// CHECK-SEGSTK: define dso_local i32 @main() [[SS]] {
// CHECK-SEGSTK-NOT: [[NSS]] = { {{.*}} "split-stack" {{.*}} }
// CHECK-SEGSTK: [[SS]] = { {{.*}} "split-stack" {{.*}} }
// CHECK-SEGSTK-NOT: [[NSS]] = { {{.*}} "split-stack" {{.*}} }
// CHECK-NOSEGSTK: define dso_local i32 @foo() #0 {
// CHECK-NOSEGSTK: define dso_local i32 @main() #0 {
// CHECK-NOSEGSTK-NOT: #0 = { {{.*}} "split-stack" {{.*}} }
|