brintos

brintos / llvm-project-archived public Read only

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