This is an archive of the discontinued LLVM Phabricator instance.

IR: Represent -ggnu-pubnames with a flag on the DICompileUnit.
ClosedPublic

Authored by pcc on Sep 8 2017, 5:54 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Sep 8 2017, 5:54 PM
dblaikie edited edge metadata.Sep 11 2017, 2:20 PM

Reckon maybe a test case with two units - one using gnu pubnames, one not, would be worth having to demonstrate that all works fine & is appropriately respected?

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
412–422 ↗(On Diff #114466)

Looks like this function could be moved to be a member of DwarfCompileUnit? (& move the DwarfPubSections opt into the DwarfCompileUnit.cpp file?)

Just a thought - see how you feel about it, if you think it's better here, that's fine.

llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
1 ↗(On Diff #114466)

Is this use of 'sed' in a RUN line portable to windows (I forget exactly which command line tools are available/dependendable in the lit environment there)?

pcc added a comment.Sep 11 2017, 4:42 PM

Reckon maybe a test case with two units - one using gnu pubnames, one not, would be worth having to demonstrate that all works fine & is appropriately respected?

Added, see llvm/test/DebugInfo/X86/gnu-public-names-multiple-cus.ll.

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
412–422 ↗(On Diff #114466)

I think that makes sense, done.

What do you think about removing the -generate-dwarf-pub-sections flag entirely? It seems that we only use it in a handful of tests where it looks like it would suffice to use -debugger-tune instead. In any event, that can probably be done as a followup.

llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
1 ↗(On Diff #114466)

I think so, we are using sed like this in a few places already: http://llvm-cs.pcc.me.uk/?q=RUN%3A+sed

pcc updated this revision to Diff 114736.Sep 11 2017, 4:42 PM

Address review comments.

dblaikie accepted this revision.Sep 12 2017, 2:30 PM

Looks good, thanks

This revision is now accepted and ready to land.Sep 12 2017, 2:30 PM

Looks totally reasonable to me. Going through and cleaning up the last set of bool flags when you get a chance would be nice.

This revision was automatically updated to reflect the committed changes.