================
@@ -226,6 +226,47 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args,
StringRef BoundArch,
A->claim();
continue;
}
+ if (A->getOption().getID() == options::OPT_dxc_hlsl_version) {
+ // Translate -HV into -std for llvm
+ // depending on the value given
+ llvm::StringRef value(A->getValue());
+ llvm::StringRef acceptedValues(
+ Opts.getOptionValues(options::OPT_dxc_hlsl_version));
+ llvm::SmallVector<StringRef, 8> validValues;
+ acceptedValues.split(validValues, ", ");
+ if (value == validValues[0]) {
----------------
python3kgae wrote:
We can do something like
https://github.com/llvm/llvm-project/blob/main/clang/lib/Frontend/CompilerInvocation.cpp#L3689
where the OPT_std_EQ is checked
with the LangStandard::getLangKind at
https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/LangStandards.cpp#L64
Maybe add LangStandard::getHLSLLangKind ?
https://github.com/llvm/llvm-project/pull/83938
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits