Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang -target x86_64-linux-gnu -fsplit-stack -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-SEGSTK %s
      2 // RUN: %clang -target x86_64-linux-gnu -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-NOSEGSTK %s
      3 
      4 int foo() {
      5   return 0;
      6 }
      7 
      8 __attribute__((no_split_stack))
      9 int nosplit() {
     10   return 0;
     11 }
     12 
     13 int main() {
     14   return foo();
     15 }
     16 
     17 // CHECK-SEGSTK: define i32 @foo() [[SS:#[0-9]+]] {
     18 // CHECK-SEGSTK: define i32 @nosplit() [[NSS:#[0-9]+]] {
     19 // CHECK-SEGSTK: define 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 i32 @foo() #0 {
     25 // CHECK-NOSEGSTK: define i32 @main() #0 {
     26 // CHECK-NOSEGSTK-NOT: #0 = { {{.*}} "split-stack" {{.*}} }
     27