mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-09 13:56:07 +00:00

The NSS FileCheck variables at the end of the CodeGenCXX/split-stacks.cpp clang testcase are off by 1, resulting in the use of an undefined variable (NSS3). One of the CHECK-NOT is also redundant because _Z8tnosplitIiEiv uses the same attribute as _Z3foov without split stack. This commit fixes that. Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D99839
33 lines
1.3 KiB
C++
33 lines
1.3 KiB
C++
// RUN: %clang -target x86_64-linux-gnu -fsplit-stack -S -std=c++11 %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-SEGSTK %s
|
|
// RUN: %clang -target x86_64-linux-gnu -S -std=c++11 %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-NOSEGSTK %s
|
|
|
|
int foo() {
|
|
return 0;
|
|
}
|
|
|
|
template <typename T>
|
|
[[gnu::no_split_stack]]
|
|
int tnosplit() {
|
|
return 0;
|
|
}
|
|
|
|
[[gnu::no_split_stack]]
|
|
int nosplit() {
|
|
return tnosplit<int>();
|
|
}
|
|
|
|
// CHECK-SEGSTK: define dso_local i32 @_Z3foov() [[SS:#[0-9]+]] {
|
|
// CHECK-SEGSTK: define dso_local i32 @_Z7nosplitv() [[NSS1:#[0-9]+]] {
|
|
// CHECK-SEGSTK: define linkonce_odr dso_local i32 @_Z8tnosplitIiEiv() [[NSS2:#[0-9]+]] comdat {
|
|
// CHECK-SEGSTK-NOT: [[NSS1]] = { {{.*}} "split-stack" {{.*}} }
|
|
// CHECK-SEGSTK-NOT: [[NSS2]] = { {{.*}} "split-stack" {{.*}} }
|
|
// CHECK-SEGSTK: [[SS]] = { {{.*}} "split-stack" {{.*}} }
|
|
// CHECK-SEGSTK-NOT: [[NSS1]] = { {{.*}} "split-stack" {{.*}} }
|
|
// CHECK-SEGSTK-NOT: [[NSS2]] = { {{.*}} "split-stack" {{.*}} }
|
|
|
|
// CHECK-NOSEGSTK: define dso_local i32 @_Z3foov() [[NSS0:#[0-9]+]] {
|
|
// CHECK-NOSEGSTK: define dso_local i32 @_Z7nosplitv() [[NSS1:#[0-9]+]] {
|
|
// CHECK-NOSEGSTK: define linkonce_odr dso_local i32 @_Z8tnosplitIiEiv() [[NSS0]] comdat {
|
|
// CHECK-NOSEGSTK-NOT: [[NSS0]] = { {{.*}} "split-stack" {{.*}} }
|
|
// CHECK-NOSEGSTK-NOT: [[NSS1]] = { {{.*}} "split-stack" {{.*}} }
|