Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/AST/RecordLayoutBuilder.cpp
Show First 20 Lines • Show All 1,962 Lines • ▼ Show 20 Lines | if (IsMsStruct) { | ||||
} | } | ||||
} | } | ||||
} | } | ||||
bool FieldPacked = (Packed && (!FieldClass || FieldClass->isPOD() || | bool FieldPacked = (Packed && (!FieldClass || FieldClass->isPOD() || | ||||
FieldClass->hasAttr<PackedAttr>() || | FieldClass->hasAttr<PackedAttr>() || | ||||
Context.getLangOpts().getClangABICompat() <= | Context.getLangOpts().getClangABICompat() <= | ||||
LangOptions::ClangABI::Ver15 || | LangOptions::ClangABI::Ver15 || | ||||
Target.isPS() || Target.isOSDarwin())) || | Target.isPS() || Target.isOSDarwin() || | ||||
Target.isOSAIX())) || | |||||
hubert.reinterpretcast: I agree we are good with z/OS having this change take effect going forward because the ABI was… | |||||
D->hasAttr<PackedAttr>(); | D->hasAttr<PackedAttr>(); | ||||
// When used as part of a typedef, or together with a 'packed' attribute, the | // When used as part of a typedef, or together with a 'packed' attribute, the | ||||
// 'aligned' attribute can be used to decrease alignment. In that case, it | // 'aligned' attribute can be used to decrease alignment. In that case, it | ||||
// overrides any computed alignment we have, and there is no need to upgrade | // overrides any computed alignment we have, and there is no need to upgrade | ||||
// the alignment. | // the alignment. | ||||
auto alignedAttrCanDecreaseAIXAlignment = [AlignRequirement, FieldPacked] { | auto alignedAttrCanDecreaseAIXAlignment = [AlignRequirement, FieldPacked] { | ||||
// Enum alignment sources can be safely ignored here, because this only | // Enum alignment sources can be safely ignored here, because this only | ||||
▲ Show 20 Lines • Show All 1,746 Lines • Show Last 20 Lines |
I agree we are good with z/OS having this change take effect going forward because the ABI was "stabilized" with a version where this change was effective.
I don't know if @SeanP has any comments on -fclang-abi-compat=15 exposing the pre-stable ABI behaviour (at least with the code here). My understanding is that the Open XL product exposed the "Clang 16" behaviour with -fclang-abi-compat=n for some n less than 16.