[cfe-dev] Debug info level specification with the clang driver

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Thu Jul 30 13:17:54 PDT 2020


On Thu, Jul 30, 2020 at 11:16 AM Robinson, Paul <paul.robinson at sony.com> wrote:
>
> > As long as all the debug info kinds fit onto one axis where the
> > next-higher kind adds more debug info than the previous level it
> > feels weird to split out some of the options. I guess what you
> > really want is to remove -debug-info-kind=none and split that
> > out. At the cc1 level, we probably want one flag that does
> > nothing but turn on debug info (-emit-debug-info?), and all
> > other debug info flags just control what is emitted, if that
> > control flag is set.
>
> What Adrian said.  The notion of a "limit" seems like it is really
> only refining what happens above "line tables."  Not clear there’s
> a benefit to having two separate controls there.

Hopefully my example to Adrian on this thread helps explain the motivation.

Essentially we want some flag we can always pass that enables ctor
homing when type information is emitted, but doesn't affect things
otherwise.

i.e, something that does this:
clang -g x.cpp // no new flag, classic vtable homing
clang <flag> x.cpp // no debug info
clang <flag> -g x.cpp // constructor homing, despite the vtable homing default
clang <flag> -g x.cpp -gmlt // gmlt debug info - no homing, because no
types are emitted here


More information about the cfe-dev mailing list