[PATCH] D80242: [Clang] implement -fno-eliminate-unused-debug-types
Paul Robinson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 10 12:13:41 PDT 2020
probinson added a subscriber: debug-info.
probinson added a comment.
+debug-info tag
Needs a Driver test to show that the Right Thing gets passed to cc1.
================
Comment at: clang/docs/CommandGuide/clang.rst:438
+
+ By default, Clang does not emit type information for types that are declared
+ but not used in a program. To retain the debug info for these unused types,
----------------
The change to the command-line reference says "defined" not "declared", these should be consistent.
================
Comment at: clang/docs/UsersManual.rst:2319
+
+ By default, Clang does not emit type information for types that are declared
+ but not used in a program. To retain the debug info for these unused types,
----------------
"declared" vs "defined" again.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5149
+ Args.AddLastArg(CmdArgs, options::OPT_feliminate_unused_debug_types);
+ Args.AddLastArg(CmdArgs, options::OPT_fno_eliminate_unused_debug_types);
Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions);
----------------
Looks like this makes the "no" option take precedence, even if it comes before "yes" option. Should check for both in one call, so you really do take the last one:
```
Args.AddLastArg(CmdArgs, options::OPT_feliminate_unused_debug_types, options::OPT_fno_eliminate_unused_debug_types);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80242/new/
https://reviews.llvm.org/D80242
More information about the cfe-commits
mailing list