[clang] bb7835e - [PS5] Apply 'packed' attribute to base classes, matching PS4 ABI
Paul Robinson via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 2 12:26:35 PDT 2022
Author: Paul Robinson
Date: 2022-06-02T12:26:26-07:00
New Revision: bb7835e2a7fbb12d711736862e75497c83a45be2
URL: https://github.com/llvm/llvm-project/commit/bb7835e2a7fbb12d711736862e75497c83a45be2
DIFF: https://github.com/llvm/llvm-project/commit/bb7835e2a7fbb12d711736862e75497c83a45be2.diff
LOG: [PS5] Apply 'packed' attribute to base classes, matching PS4 ABI
Added:
Modified:
clang/lib/AST/RecordLayoutBuilder.cpp
clang/test/CodeGenCXX/alignment.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp
index 8827e956fc2f4..30f9d84a9dfdd 100644
--- a/clang/lib/AST/RecordLayoutBuilder.cpp
+++ b/clang/lib/AST/RecordLayoutBuilder.cpp
@@ -1223,7 +1223,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) {
// Per GCC's documentation, it only applies to non-static data members.
return (Packed && ((Context.getLangOpts().getClangABICompat() <=
LangOptions::ClangABI::Ver6) ||
- Context.getTargetInfo().getTriple().isPS4() ||
+ Context.getTargetInfo().getTriple().isPS() ||
Context.getTargetInfo().getTriple().isOSAIX()))
? CharUnits::One()
: UnpackedAlign;
diff --git a/clang/test/CodeGenCXX/alignment.cpp b/clang/test/CodeGenCXX/alignment.cpp
index ffa4d873b5d76..98ce2fa28540f 100644
--- a/clang/test/CodeGenCXX/alignment.cpp
+++ b/clang/test/CodeGenCXX/alignment.cpp
@@ -1,6 +1,7 @@
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOCOMPAT
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-apple-darwin10 -fclang-abi-compat=6.0 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-scei-ps4 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
+// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-sie-ps5 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V6COMPAT
extern int int_source();
extern void int_sink(int x);
More information about the cfe-commits
mailing list