Author: Paul Robinson Date: 2022-07-12T08:10:25-07:00 New Revision: 2b9055cee657fbec1afa93da3751bb923649fbde
URL: https://github.com/llvm/llvm-project/commit/2b9055cee657fbec1afa93da3751bb923649fbde DIFF: https://github.com/llvm/llvm-project/commit/2b9055cee657fbec1afa93da3751bb923649fbde.diff LOG: [PS4/PS5] NFC: Use preferred predicate in a triple check Also add a test to verify this difference in the PS4/PS5 ABIs, now that we have identified it. Added: Modified: clang/lib/Basic/TargetInfo.cpp clang/test/CodeGenCXX/uncopyable-args.cpp Removed: ################################################################################ diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp index e22ed34e7da46..6685145ea6d2e 100644 --- a/clang/lib/Basic/TargetInfo.cpp +++ b/clang/lib/Basic/TargetInfo.cpp @@ -503,7 +503,7 @@ bool TargetInfo::initFeatureMap( TargetInfo::CallingConvKind TargetInfo::getCallingConvKind(bool ClangABICompat4) const { if (getCXXABI() != TargetCXXABI::Microsoft && - (ClangABICompat4 || getTriple().getOS() == llvm::Triple::PS4)) + (ClangABICompat4 || getTriple().isPS4())) return CCK_ClangABI4OrPS4; return CCK_Default; } diff --git a/clang/test/CodeGenCXX/uncopyable-args.cpp b/clang/test/CodeGenCXX/uncopyable-args.cpp index 529bc3baf798d..e03c9970747a5 100644 --- a/clang/test/CodeGenCXX/uncopyable-args.cpp +++ b/clang/test/CodeGenCXX/uncopyable-args.cpp @@ -1,6 +1,7 @@ // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=NEWABI // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-unknown -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=OLDABI // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-scei-ps4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=OLDABI +// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-sie-ps5 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=NEWABI // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-msvc -emit-llvm -o - %s -fms-compatibility -fms-compatibility-version=18 | FileCheck %s -check-prefix=WIN64 -check-prefix=WIN64-18 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-msvc -emit-llvm -o - %s -fms-compatibility -fms-compatibility-version=19 | FileCheck %s -check-prefix=WIN64 -check-prefix=WIN64-19 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits