[clang] a93cb93 - [clang/driver] Make sure that `-gno-modules` by itself doesn't enable debug info
Argyrios Kyrtzidis via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 21 11:39:38 PST 2023
Author: Argyrios Kyrtzidis
Date: 2023-01-21T11:33:30-08:00
New Revision: a93cb9302c1ac03f71d3a85de9405dc97c1bbc99
URL: https://github.com/llvm/llvm-project/commit/a93cb9302c1ac03f71d3a85de9405dc97c1bbc99
DIFF: https://github.com/llvm/llvm-project/commit/a93cb9302c1ac03f71d3a85de9405dc97c1bbc99.diff
LOG: [clang/driver] Make sure that `-gno-modules` by itself doesn't enable debug info
Added:
Modified:
clang/include/clang/Driver/Options.td
clang/test/Driver/debug-options.c
Removed:
################################################################################
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 12425e18406f0..40fb986fd6798 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -3291,7 +3291,7 @@ def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>,
HelpText<"Generate debug info with external references to clang modules"
" or precompiled headers">;
-def gno_modules : Flag <["-"], "gno-modules">, Group<gN_Group>;
+def gno_modules : Flag <["-"], "gno-modules">, Group<g_flags_Group>;
def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>,
HelpText<"DWARF debug sections compression type">;
def gz : Flag<["-"], "gz">, Alias<gz_EQ>, AliasArgs<["zlib"]>, Group<g_flags_Group>;
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
index b2198ebd0a207..dedd96c82da96 100644
--- a/clang/test/Driver/debug-options.c
+++ b/clang/test/Driver/debug-options.c
@@ -303,6 +303,8 @@
// RUN: %clang -### -gmodules -gno-modules %s 2>&1 \
// RUN: | FileCheck -check-prefix=NOGEXTREFS %s
//
+// RUN: %clang -### -gno-modules %s 2>&1 | FileCheck -check-prefix=GNOMOD %s
+//
// NOG_PS: "-cc1"
// NOG_PS-NOT: "-dwarf-version=
// NOG_PS: "-generate-arange-section"
@@ -411,6 +413,8 @@
// GEXTREFS: "-dwarf-ext-refs" "-fmodule-format=obj"
// GEXTREFS: "-debug-info-kind={{standalone|constructor}}"
// NOGEXTREFS-NOT: -dwarf-ext-refs
+//
+// GNOMOD-NOT: -debug-info-kind=
// RUN: not %clang -cc1 -debug-info-kind=watkind 2>&1 | FileCheck -check-prefix=BADSTRING1 %s
// BADSTRING1: error: invalid value 'watkind' in '-debug-info-kind=watkind'
More information about the cfe-commits
mailing list