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