[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)
Chris B via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 14:43:58 PDT 2024
================
@@ -69,6 +69,16 @@ LangStandard::Kind LangStandard::getLangKind(StringRef Name) {
.Default(lang_unspecified);
}
+LangStandard::Kind LangStandard::getHLSLLangKind(StringRef Name) {
+ return llvm::StringSwitch<LangStandard::Kind>(Name)
+ .Case("2016", LangStandard::lang_hlsl2016)
+ .Case("2017", LangStandard::lang_hlsl2017)
+ .Case("2018", LangStandard::lang_hlsl2018)
+ .Case("2021", LangStandard::lang_hlsl2021)
+ .Case("202x", LangStandard::lang_hlsl202x)
+ .Default(LangStandard::lang_unspecified);
+}
----------------
llvm-beanz wrote:
This function isn't needed if you use the Options Enum marshalling that I suggested.
https://github.com/llvm/llvm-project/pull/83938
More information about the llvm-commits
mailing list