Conditionally set version LDC_DCompute (#2236)

This commit is contained in:
Nicholas Wilson 2017-07-24 18:34:53 +08:00 committed by GitHub
parent 76a0dd296f
commit a95d83e05f

View file

@ -913,8 +913,11 @@ void registerPredefinedVersions() {
VersionCondition::addPredefinedGlobalIdent("LDC");
VersionCondition::addPredefinedGlobalIdent("all");
VersionCondition::addPredefinedGlobalIdent("D_Version2");
#if LDC_LLVM_SUPPORTED_TARGET_SPIRV || LDC_LLVM_SUPPORTED_TARGET_NVPTX
VersionCondition::addPredefinedGlobalIdent("LDC_DCompute");
if (dcomputeTargets.size() != 0) {
VersionCondition::addPredefinedGlobalIdent("LDC_DCompute");
}
#endif
if (global.params.doDocComments) {