[PATCH] D116003: [NFC] Specify targets for clang stack-protector-guard.c
Qiu Chaofan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 19 09:04:24 PST 2021
qiucf created this revision.
qiucf added reviewers: tejohnson, MaskRay, lkail, nickdesaulniers.
qiucf requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
The run line of `stack-protector-guard.c` doesn't specify the triple, which means it depends on the platform running the test. This makes some failure hidden.
Repository:
rG LLVM Github Monorepo
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,8 +1,28 @@
-// 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-unknown-unknown \
+// RUN: -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1024 \
+// RUN: -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple powerpc64le-linux-gnu \
+// RUN: -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1024 \
+// RUN: -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple arm-eabi-c \
+// RUN: -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1024 \
+// RUN: -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple thumbv7-eabi-c \
+// RUN: -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1024 \
+// RUN: -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple aarch64-linux-gnu \
+// RUN: -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1024 \
+// RUN: -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-unknown -o - \
+// RUN: | FileCheck --check-prefix=CHECK-NONE %s
+// RUN: %clang_cc1 -emit-llvm %s -triple powerpc64le-linux-gnu -o - \
+// RUN: | FileCheck --check-prefix=CHECK-NONE %s
+// RUN: %clang_cc1 -emit-llvm %s -triple arm-eabi-c -o - \
+// RUN: | FileCheck --check-prefix=CHECK-NONE %s
+// RUN: %clang_cc1 -emit-llvm %s -triple thumbv7-eabi-c -o - \
+// RUN: | FileCheck --check-prefix=CHECK-NONE %s
+// RUN: %clang_cc1 -emit-llvm %s -triple aarch64-linux-gnu -o - \
+// RUN: | FileCheck --check-prefix=CHECK-NONE %s
void foo(int*);
void bar(int x) {
int baz[x];
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116003.395339.patch
Type: text/x-patch
Size: 2217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211219/85f2e5e9/attachment.bin>
More information about the cfe-commits
mailing list