[PATCH] D125414: Revert "[HLSL] add -D option for dxc mode."
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 11 13:39:07 PDT 2022
python3kgae created this revision.
Herald added a subscriber: Anastasia.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.
This reverts commit 4dae38ebfba0d8583e52c3ded8f62f5f9fa77fda <https://reviews.llvm.org/rG4dae38ebfba0d8583e52c3ded8f62f5f9fa77fda>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125414
Files:
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/dxc_D.hlsl
Index: clang/test/Driver/dxc_D.hlsl
===================================================================
--- clang/test/Driver/dxc_D.hlsl
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %clang_dxc -DTEST=2 -### %s 2>&1 | FileCheck %s
-// RUN: %clang_dxc -DTEST=2 -Tlib_6_7 %s -fcgl -Fo - | FileCheck %s --check-prefix=ERROR
-
-// Make sure -D send to cc1.
-// CHECK:"-D" "TEST=2"
-
-#ifndef TEST
-#error "TEST not defined"
-#elif TEST != 2
-#error "TEST defined to wrong value"
-#endif
-
-// ERROR-NOT: error:
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -3471,9 +3471,9 @@
static void RenderHLSLOptions(const ArgList &Args, ArgStringList &CmdArgs,
types::ID InputType) {
- const unsigned ForwardedArguments[] = {
- options::OPT_dxil_validator_version, options::OPT_D, options::OPT_S,
- options::OPT_emit_llvm, options::OPT_disable_llvm_passes};
+ const unsigned ForwardedArguments[] = {options::OPT_dxil_validator_version,
+ options::OPT_S, options::OPT_emit_llvm,
+ options::OPT_disable_llvm_passes};
for (const auto &Arg : ForwardedArguments)
if (const auto *A = Args.getLastArg(Arg))
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -6756,8 +6756,6 @@
"lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_x,"
"ms_6_5, ms_6_6, ms_6_7,"
"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 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: D125414.428760.patch
Type: text/x-patch
Size: 2079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220511/83188358/attachment.bin>
More information about the cfe-commits
mailing list