[PATCH] D128462: [HLSL] add -I option for dxc mode.
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 13:46:54 PDT 2022
python3kgae updated this revision to Diff 444413.
python3kgae marked 3 inline comments as done.
python3kgae added a comment.
Update test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128462/new/
https://reviews.llvm.org/D128462
Files:
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/dxc_I.hlsl
Index: clang/test/Driver/dxc_I.hlsl
===================================================================
--- /dev/null
+++ clang/test/Driver/dxc_I.hlsl
@@ -0,0 +1,4 @@
+// RUN: %clang_dxc -I test -### %s 2>&1 | FileCheck %s
+
+// Make sure -I send to cc1.
+// CHECK:"-I" "test"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -3481,6 +3481,7 @@
types::ID InputType) {
const unsigned ForwardedArguments[] = {options::OPT_dxil_validator_version,
options::OPT_D,
+ options::OPT_I,
options::OPT_S,
options::OPT_emit_llvm,
options::OPT_disable_llvm_passes,
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -6820,6 +6820,8 @@
Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>;
class DXCJoinedOrSeparate<string name> : Option<["/", "-"], name,
KIND_JOINED_OR_SEPARATE>, Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>;
+class DXCJoinedOrSeparateConflict<string name> : Option<["--", "/", "-"], name,
+ KIND_JOINED_OR_SEPARATE>, Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>;
def dxc_help : Option<["/", "-", "--"], "help", KIND_JOINED>,
Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<help>,
@@ -6846,6 +6848,9 @@
"as_6_5, as_6_6, as_6_7">;
def dxc_D : Option<["--", "/", "-"], "D", KIND_JOINED_OR_SEPARATE>,
Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<D>;
+def dxc_I : DXCJoinedOrSeparateConflict<"I">,
+ HelpText<"Add directory to include search path">,
+ Alias<I>;
def emit_pristine_llvm : DXCFlag<"emit-pristine-llvm">,
HelpText<"Emit pristine LLVM IR from the frontend by not running any LLVM passes at all."
"Same as -S + -emit-llvm + -disable-llvm-passes.">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128462.444413.patch
Type: text/x-patch
Size: 2188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220713/f726ee0a/attachment.bin>
More information about the cfe-commits
mailing list