[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for LLDB tuning, unless -ggnu-pubnames is specified. (PR #83331)
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 12:13:51 PST 2024
================
@@ -11,7 +11,6 @@
// NOINLINE-NOT: "-fsplit-dwarf-inlining"
// SPLIT-NOT: "-dumpdir"
// SPLIT: "-debug-info-kind=constructor"
-// SPLIT-SAME: "-ggnu-pubnames"
----------------
dwblaikie wrote:
> As discussed in original PR, #82840 , the idea is if -gsplit-dwarf with -glldb is used the -ggnu-pubnames wouldn't be passed in. Since LLDB doesn't benefit from it, and it just uses space.
Yep, I'm with you on all of that.
> A fix from original is if someone does specify -ggnu-pubnames it will be generated.
Sure.
> I added a test for it on linux side.
Added a test for what on the linux side? And where is that test?
> There is also a test on mac side that used -gsplit-dwarf with -ggnu-pubnames.
Right, I see that test here in this `split-debug.c` file at the end. Checking for the absence of `-ggnu-pubnames` if `-gsplit-dwarf -g -glldb` is passed, and the presence if `-gsplit-dwarf -g -glldb -ggnu-pubnames` is passed. So I'm with you there.
But what i don't understand is that, with the removal of the `// SPLIT-SAME: "-ggnu-pubnames"` line above - what tests that, for instance `-gsplit-dwarf -g -ggdb` does use `-ggnu-pubnames`? (said another way: If we removed the any code that added `-ggnu-pubnames` when `-gsplit-dwarf` is specified, which lit tests would fail?)
https://github.com/llvm/llvm-project/pull/83331
More information about the cfe-commits
mailing list