================
@@ -3723,6 +3723,10 @@ static void RenderHLSLOptions(const ArgList &Args,
ArgStringList &CmdArgs,
if (!Args.hasArg(options::OPT_dxc_no_stdinc) &&
!Args.hasArg(options::OPT_nostdinc))
CmdArgs.push_back("-finclude-default-header");
+ if (Args.hasArg(options::OPT_dxc_col_major))
+ CmdArgs.push_back("-fmatrix-memory-layout=column-major");
+ if (Args.hasArg(options::OPT_dxc_row_major))
+ CmdArgs.push_back("-fmatrix-memory-layout=row-major");
----------------
farzonl wrote:
try and figure out how to replace this with
```diff
diff --git a/clang/lib/Driver/ToolChains/HLSL.cpp
b/clang/lib/Driver/ToolChains/HLSL.cpp
index 5d7221b8718a..11597b168f59 100644
--- a/clang/lib/Driver/ToolChains/HLSL.cpp
+++ b/clang/lib/Driver/ToolChains/HLSL.cpp
@@ -506,7 +510,18 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args,
StringRef BoundArch,
A->claim();
continue;
}
-
+ if (A->getOption().getID() == options::OPT_dxc_col_major) {
+ DAL->AddSeparateArg(nullptr,
Opts.getOption(options::OPT_fmatrix_memory_layout_EQ),
+ "column-major");
+ A->claim();
+ continue;
+ }
+ if (A->getOption().getID() == options::OPT_dxc_row_major) {
+ DAL->AddSeparateArg(nullptr,
Opts.getOption(options::OPT_fmatrix_memory_layout_EQ),
+ "row-major");
+ A->claim();
+ continue;
+ }
DAL->append(A);
}
```
https://github.com/llvm/llvm-project/pull/171550
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits