Predefine version D_X32 for 64-bit targets with 32-bit pointer size

This commit is contained in:
Martin Kinkelin 2021-08-14 18:52:23 +02:00
parent a6cc5cde38
commit ec5fd799b9
2 changed files with 3 additions and 0 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");
}