[PATCH] D100809: [Debug-Info] implement -gstrict-dwarf
ChenZheng via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 20 01:25:52 PDT 2021
shchenz added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3973-3974
+ // as true by default.
+ if (const Arg *A = Args.getLastArg(options::OPT_gstrict_dwarf))
+ (void)checkDebugInfoOption(A, Args, D, TC);
+ if (Args.hasFlag(options::OPT_gstrict_dwarf, options::OPT_gno_strict_dwarf,
----------------
dblaikie wrote:
> @aprantl or anyone else - is this the right use of checkDebugInfoOption? I forget what it's for/how it should be used.
See the nearby example for `-gcolumn-info`:
```
if (const Arg *A = Args.getLastArg(options::OPT_gcolumn_info))
(void)checkDebugInfoOption(A, Args, D, TC)
```
================
Comment at: clang/test/Driver/debug-options.c:329-330
//
+// G_STRICT: "-gstrict-dwarf"
+// STRICT-NOT: "-gstrict-dwarf"
+//
----------------
dblaikie wrote:
> "STRICT" v "G_STRICT" seems confusing to me - how do other flags differentiate their positive/negative tests? (looks like GNO_X/GX or GX/NOX, etc - something like that'd be good)
use the similar way like `GPUB` & `NOPUB`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100809/new/
https://reviews.llvm.org/D100809
More information about the cfe-commits
mailing list