Skip to content

Commit d188916

Browse files
committed
[Driver][DXC] Accept -f{no-,}discard-value-names in the DXC driver
1 parent b627bde commit d188916

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,9 +1870,11 @@ defm safe_buffer_usage_suggestions : BoolFOption<"safe-buffer-usage-suggestions"
18701870
PosFlag<SetTrue, [], [ClangOption, CC1Option],
18711871
"Display suggestions to update code associated with -Wunsafe-buffer-usage warnings">,
18721872
NegFlag<SetFalse>>;
1873-
def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>,
1873+
def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">,
1874+
Group<f_clang_Group>, Visibility<[ClangOption, DXCOption]>,
18741875
HelpText<"Discard value names in LLVM IR">, Flags<[NoXarchOption]>;
1875-
def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, Group<f_clang_Group>,
1876+
def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">,
1877+
Group<f_clang_Group>, Visibility<[ClangOption, DXCOption]>,
18761878
HelpText<"Do not discard value names in LLVM IR">, Flags<[NoXarchOption]>;
18771879
defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers",
18781880
LangOpts<"DollarIdents">, Default<!strconcat("!", asm_preprocessor.KeyPath)>,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// RUN: %clang_dxc -### -T lib_6_6 -Fc - -fdiscard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-DISCARD-NAMES %s
2+
// RUN: %clang_dxc -### -T lib_6_6 -Fc - -fno-discard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-NO-DISCARD-NAMES %s
3+
// CHECK-DISCARD-NAMES: "-discard-value-names"
4+
// CHECK-NO-DISCARD-NAMES-NOT: "-discard-value-names"

0 commit comments

Comments
 (0)