[PATCH] D116003: [NFC] Specify targets for clang stack-protector-guard.c

Qiu Chaofan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 29 18:15:48 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4039d17355b7: [NFC] Specify targets for clang stack-protector-guard.c (authored by qiucf).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116003/new/

https://reviews.llvm.org/D116003

Files:
  clang/test/CodeGen/stack-protector-guard.c


Index: clang/test/CodeGen/stack-protector-guard.c
===================================================================
--- clang/test/CodeGen/stack-protector-guard.c
+++ clang/test/CodeGen/stack-protector-guard.c
@@ -1,16 +1,25 @@
-// RUN: %clang_cc1 -mstack-protector-guard=sysreg \
-// RUN:            -mstack-protector-guard-reg=sp_el0 \
-// RUN:            -mstack-protector-guard-offset=1024 \
-// RUN:            -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck --check-prefix=CHECK-NONE %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple x86_64-linux-gnu \
+// RUN:   -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple powerpc64le-linux-gnu \
+// RUN:   -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple arm-linux-gnueabi \
+// RUN:   -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple thumbv7-linux-gnueabi \
+// RUN:   -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple aarch64-linux-gnu \
+// RUN:   -mstack-protector-guard-offset=1024 -mstack-protector-guard-reg=sp_el0 \
+// RUN:   -emit-llvm %s -o - | FileCheck %s --check-prefix=AARCH64
 void foo(int*);
 void bar(int x) {
   int baz[x];
   foo(baz);
 }
 
-// CHECK: !llvm.module.flags = !{{{.*}}[[ATTR1:![0-9]+]], [[ATTR2:![0-9]+]], [[ATTR3:![0-9]+]]}
+// CHECK: !llvm.module.flags = !{{{.*}}[[ATTR1:![0-9]+]], [[ATTR2:![0-9]+]]}
 // CHECK: [[ATTR1]] = !{i32 1, !"stack-protector-guard", !"sysreg"}
-// CHECK: [[ATTR2]] = !{i32 1, !"stack-protector-guard-reg", !"sp_el0"}
-// CHECK: [[ATTR3]] = !{i32 1, !"stack-protector-guard-offset", i32 1024}
-// CHECK-NONE-NOT: !"stack-protector-guard
+// CHECK: [[ATTR2]] = !{i32 1, !"stack-protector-guard-offset", i32 1024}
+
+// AARCH64: !llvm.module.flags = !{{{.*}}[[ATTR1:![0-9]+]], [[ATTR2:![0-9]+]], [[ATTR3:![0-9]+]]}
+// AARCH64: [[ATTR1]] = !{i32 1, !"stack-protector-guard", !"sysreg"}
+// AARCH64: [[ATTR2]] = !{i32 1, !"stack-protector-guard-reg", !"sp_el0"}
+// AARCH64: [[ATTR3]] = !{i32 1, !"stack-protector-guard-offset", i32 1024}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116003.396590.patch
Type: text/x-patch
Size: 2314 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211230/497b89ba/attachment.bin>


More information about the cfe-commits mailing list