mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 15:56:07 +00:00
[PS5] Pack non-POD members in packed structs, matching PS4 ABI
This commit is contained in:
parent
bb7835e2a7
commit
30b7ffe74e
@ -1891,7 +1891,7 @@ void ItaniumRecordLayoutBuilder::LayoutField(const FieldDecl *D,
|
||||
bool FieldPacked = (Packed && (!FieldClass || FieldClass->isPOD() ||
|
||||
Context.getLangOpts().getClangABICompat() <=
|
||||
LangOptions::ClangABI::Ver14 ||
|
||||
Target.isPS4() || Target.isOSDarwin())) ||
|
||||
Target.isPS() || Target.isOSDarwin())) ||
|
||||
D->hasAttr<PackedAttr>();
|
||||
|
||||
AlignRequirementKind AlignRequirement = AlignRequirementKind::None;
|
||||
|
@ -2,6 +2,7 @@
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -DCLANG_ABI_COMPAT=14
|
||||
// RUN: %clang_cc1 -triple x86_64-scei-ps4 %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -DCLANG_ABI_COMPAT=6
|
||||
// RUN: %clang_cc1 -triple x86_64-sie-ps5 %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -DCLANG_ABI_COMPAT=6
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -fclang-abi-compat=6 -DCLANG_ABI_COMPAT=6
|
||||
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -fsyntax-only -verify -std=c++11 -Wno-inaccessible-base -fclang-abi-compat=14 -DCLANG_ABI_COMPAT=14
|
||||
// expected-no-diagnostics
|
||||
|
Loading…
x
Reference in New Issue
Block a user