diff options
author | Douglas Yung <douglas.yung@sony.com> | 2018-05-12 00:06:59 +0000 |
---|---|---|
committer | Douglas Yung <douglas.yung@sony.com> | 2018-05-12 00:06:59 +0000 |
commit | dde9de7cf943ace41ac69589df661b2ab54dd76b (patch) | |
tree | 0d035e91adb07f02d2e25e8bcd21a80baf18a363 /clang/test | |
parent | 79a736136772fab259f5e28ff2581fd37f97e43f (diff) | |
download | bcm5719-llvm-dde9de7cf943ace41ac69589df661b2ab54dd76b.tar.gz bcm5719-llvm-dde9de7cf943ace41ac69589df661b2ab54dd76b.zip |
Force the PS4 clang ABI version to 6.
The PS4 requires clang ABI version 6 for compatibility reasons. This change forces this and if the user specifies a different version when the PS4 target is specified, the compiler emits a warning that the specified version is being ignored.
Reviewers: probinson
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46767
llvm-svn: 332160
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/alignment.cpp | 3 | ||||
-rw-r--r-- | clang/test/Driver/clang-abi-compat.cpp | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/alignment.cpp b/clang/test/CodeGenCXX/alignment.cpp index 2549afda882..6956637aaef 100644 --- a/clang/test/CodeGenCXX/alignment.cpp +++ b/clang/test/CodeGenCXX/alignment.cpp @@ -1,5 +1,8 @@ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 -fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT +// Check that the PS4 target uses the 6.0 compat settings. +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-scei-ps4 -fclang-abi-compat=latest | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT extern int int_source(); extern void int_sink(int x); diff --git a/clang/test/Driver/clang-abi-compat.cpp b/clang/test/Driver/clang-abi-compat.cpp new file mode 100644 index 00000000000..9f1789867b2 --- /dev/null +++ b/clang/test/Driver/clang-abi-compat.cpp @@ -0,0 +1,6 @@ +// PS4 target requires clang ABI version 6, check that a warning is emitted when a version other than 6 is requested. +// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=4 %s 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING +// RUN: %clang -S --target=x86_64-scei-ps4 -fclang-abi-compat=latest %s 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING + +// CHECK-WARNING: warning: target requires clang ABI version 6, ignoring requested version + |