Merge pull request #3808 from JohanEngelen/gh3802

Fix issue #3802 - Fix size_t size for 32bit ABI on 64bit architectures.
This commit is contained in:
Martin Kinkelin 2021-08-14 20:44:10 +02:00 committed by GitHub
commit d38c576919
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 21 deletions

View file

@ -728,6 +728,8 @@ void registerPredefinedTargetVersions() {
// Set versions for arch bitwidth
if (gDataLayout->getPointerSizeInBits() == 64) {
VersionCondition::addPredefinedGlobalIdent("D_LP64");
} else if (triple.isArch64Bit()) {
VersionCondition::addPredefinedGlobalIdent("D_X32");
} else if (triple.isArch16Bit()) {
VersionCondition::addPredefinedGlobalIdent("D_P16");
}