[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)

S. Bharadwaj Yadavalli via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 09:54:38 PDT 2024


================
@@ -4675,7 +4676,7 @@ bool CompilerInvocation::CreateFromArgsImpl(
   // FIXME: We shouldn't have to pass the DashX option around here
   InputKind DashX = Res.getFrontendOpts().DashX;
   ParseTargetArgs(Res.getTargetOpts(), Args, Diags);
-  llvm::Triple T(Res.getTargetOpts().Triple);
+  llvm::Triple T(llvm::Triple::normalize(Res.getTargetOpts().Triple));
----------------
bharadwajy wrote:

> IIUC `getTargetOpts().Triple` should _already_ be normalized. The definition of the option includes a "Normalizer", like so:

Thanks for pointing this out. deleted the extraneously added calls to `normalize()`.

https://github.com/llvm/llvm-project/pull/90809


More information about the cfe-commits mailing list