diff --git a/dmd2/cond.c b/dmd2/cond.c index e65a6215e5..21fd75935b 100644 --- a/dmd2/cond.c +++ b/dmd2/cond.c @@ -205,6 +205,9 @@ bool VersionCondition::isPredefined(const char *ident) "SPARC64", "S390", "S390X", +#if IN_LLVM + "SystemZ", +#endif "HPPA", "HPPA64", "SH", diff --git a/driver/main.cpp b/driver/main.cpp index 09cfa60738..445c79301b 100644 --- a/driver/main.cpp +++ b/driver/main.cpp @@ -671,6 +671,13 @@ static void registerPredefinedTargetVersions() { VersionCondition::addPredefinedGlobalIdent("NVPTX64"); VersionCondition::addPredefinedGlobalIdent("D_HardFloat"); break; +#endif +#if LDC_LLVM_VER >= 303 + case llvm::Triple::systemz: + VersionCondition::addPredefinedGlobalIdent("SystemZ"); + VersionCondition::addPredefinedGlobalIdent("S390X"); // For backwards compatibility. + VersionCondition::addPredefinedGlobalIdent("D_HardFloat"); + break; #endif default: error(Loc(), "invalid cpu architecture specified: %s", global.params.targetTriple.getArchName().str().c_str());