Lines Matching +full:diag +full:- +full:version

1 //===--- HLSL.cpp - HLSL ToolChain Implementations --------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
32 auto Version = T.getOSVersion(); in isLegalShaderModel() local
33 if (Version.getBuild()) in isLegalShaderModel()
35 if (Version.getSubminor()) in isLegalShaderModel()
50 return MinVer <= Version; in isLegalShaderModel()
54 if (Version == SM6x) in isLegalShaderModel()
58 return MinVer <= Version; in isLegalShaderModel()
63 return MinVer <= Version; in isLegalShaderModel()
101 // Determine DXIL version using the minor version number of Shader in tryParseProfile()
102 // Model version specified in target profile. Prior to decoupling DXIL version in tryParseProfile()
103 // numbering from that of Shader Model DXIL version 1.Y corresponds to SM 6.Y. in tryParseProfile()
104 // E.g., dxilv1.Y-unknown-shadermodelX.Y-hull in tryParseProfile()
136 // Always consider minor version x as the latest supported DXIL version in tryParseProfile()
140 // No DXIL Version corresponding to specified Shader Model version found in tryParseProfile()
154 VersionTuple Version; in isLegalValidatorVersion() local
155 if (Version.tryParse(ValVersionStr) || Version.getBuild() || in isLegalValidatorVersion()
156 Version.getSubminor() || !Version.getMinor()) { in isLegalValidatorVersion()
157 D.Diag(diag::err_drv_invalid_format_dxil_validator_version) in isLegalValidatorVersion()
162 uint64_t Major = Version.getMajor(); in isLegalValidatorVersion()
163 uint64_t Minor = *Version.getMinor(); in isLegalValidatorVersion()
165 D.Diag(diag::err_drv_invalid_empty_dxil_validator_version) << ValVersionStr; in isLegalValidatorVersion()
169 if (Version < MinVer) { in isLegalValidatorVersion()
170 D.Diag(diag::err_drv_invalid_range_dxil_validator_version) << ValVersionStr; in isLegalValidatorVersion()
193 CmdArgs.push_back("-o"); in ConstructJob()
236 if (A->getOption().getID() == options::OPT_dxil_validator_version) { in TranslateArgs()
237 StringRef ValVerStr = A->getValue(); in TranslateArgs()
242 if (A->getOption().getID() == options::OPT_dxc_entrypoint) { in TranslateArgs()
243 DAL->AddSeparateArg(nullptr, Opts.getOption(options::OPT_hlsl_entrypoint), in TranslateArgs()
244 A->getValue()); in TranslateArgs()
245 A->claim(); in TranslateArgs()
248 if (A->getOption().getID() == options::OPT__SLASH_O) { in TranslateArgs()
249 StringRef OStr = A->getValue(); in TranslateArgs()
251 DAL->AddFlagArg(nullptr, Opts.getOption(options::OPT_O0)); in TranslateArgs()
252 A->claim(); in TranslateArgs()
255 DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_O), OStr); in TranslateArgs()
256 A->claim(); in TranslateArgs()
260 if (A->getOption().getID() == options::OPT_emit_pristine_llvm) { in TranslateArgs()
261 // Translate -fcgl into -emit-llvm and -disable-llvm-passes. in TranslateArgs()
262 DAL->AddFlagArg(nullptr, Opts.getOption(options::OPT_emit_llvm)); in TranslateArgs()
263 DAL->AddFlagArg(nullptr, in TranslateArgs()
265 A->claim(); in TranslateArgs()
268 if (A->getOption().getID() == options::OPT_dxc_hlsl_version) { in TranslateArgs()
269 // Translate -HV into -std for llvm in TranslateArgs()
271 LangStandard::Kind LangStd = LangStandard::getHLSLLangKind(A->getValue()); in TranslateArgs()
274 DAL->AddSeparateArg(nullptr, Opts.getOption(options::OPT_std_EQ), in TranslateArgs()
277 getDriver().Diag(diag::err_drv_invalid_value) << "HV" << A->getValue(); in TranslateArgs()
280 A->claim(); in TranslateArgs()
283 DAL->append(A); in TranslateArgs()
286 // Add default validator version if not set. in TranslateArgs()
287 // TODO: remove this once read validator version from validator. in TranslateArgs()
288 if (!DAL->hasArg(options::OPT_dxil_validator_version)) { in TranslateArgs()
290 DAL->AddSeparateArg(nullptr, in TranslateArgs()
294 if (!DAL->hasArg(options::OPT_O_Group)) { in TranslateArgs()
295 DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_O), "3"); in TranslateArgs()
309 getDriver().Diag(diag::warn_drv_dxc_missing_dxv); in requiresValidation()