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

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Thu May 2 08:20:14 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));
----------------
damyanp wrote:

Looks like part of this change is to normalize `Res.getTargetOpts().Triple` in many places where it is used.

Would it be possible to arrange it so that this is normalized in one place earlier on, so all users of `getTargetOpts()` can assume that it is normalized already?

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


More information about the cfe-commits mailing list