summaryrefslogtreecommitdiff
path: root/test/CodeGen/stack-size-section.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/stack-size-section.c')
-rw-r--r--test/CodeGen/stack-size-section.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/stack-size-section.c b/test/CodeGen/stack-size-section.c
new file mode 100644
index 0000000000000..504a42de13418
--- /dev/null
+++ b/test/CodeGen/stack-size-section.c
@@ -0,0 +1,9 @@
+// REQUIRES: x86-registered-target
+
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -S -o - | FileCheck %s --check-prefix=CHECK-ABSENT
+// CHECK-ABSENT-NOT: section .stack_sizes
+
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fstack-size-section %s -S -o - | FileCheck %s --check-prefix=CHECK-PRESENT
+// CHECK-PRESENT: section .stack_sizes
+
+int foo() { return 42; }