1 // RUN: %clang_cc1 -mstack-protector-guard=sysreg \ 2 // RUN: -mstack-protector-guard-reg=sp_el0 \ 3 // RUN: -mstack-protector-guard-offset=1024 \ 4 // RUN: -emit-llvm %s -o - | FileCheck %s 5 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck --check-prefix=CHECK-NONE %s 6 void foo(int*); 7 void bar(int x) { 8 int baz[x]; 9 foo(baz); 10 } 11 12 // CHECK: !llvm.module.flags = !{{{.*}}[[ATTR1:![0-9]+]], [[ATTR2:![0-9]+]], [[ATTR3:![0-9]+]]} 13 // CHECK: [[ATTR1]] = !{i32 1, !"stack-protector-guard", !"sysreg"} 14 // CHECK: [[ATTR2]] = !{i32 1, !"stack-protector-guard-reg", !"sp_el0"} 15 // CHECK: [[ATTR3]] = !{i32 1, !"stack-protector-guard-offset", i32 1024} 16 // CHECK-NONE-NOT: !"stack-protector-guard 17