mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-01 05:26:07 +00:00

Recognize -mpacked-stack from the command line and add a function attribute "mpacked-stack" when passed. This is needed for building the Linux kernel. If this option is passed for any other target than SystemZ, an error is generated. Review: Ulrich Weigand https://reviews.llvm.org/D71441
12 lines
404 B
C
12 lines
404 B
C
// RUN: %clang_cc1 -mpacked-stack -triple s390x-ibm-linux -emit-llvm \
|
|
// RUN: -o - %s 2>&1 | FileCheck %s
|
|
// RUN: not %clang_cc1 -mpacked-stack -triple x86_64-linux-gnu \
|
|
// RUN: -emit-llvm -o - %s 2>&1 | FileCheck -check-prefix=X86 %s
|
|
|
|
int foo(void) {
|
|
return 0;
|
|
}
|
|
|
|
//CHECK: attributes #0 = { {{.*}}"packed-stack" {{.*}} }
|
|
//X86: error: option '-mpacked-stack' cannot be specified on this target
|