Page MenuHomePhabricator

Debug Info: Support for DW_AT_export_symbols for anonymous structs

Authored by shafik on Aug 22 2019, 10:49 AM.



This implements the DWARF 5 feature described in:

To support recognizing anonymous structs:

struct A { 
  struct { // Anonymous struct 
      int y;
} a;

This patch adds support for the new flag in constructTypeDIE(...) and test to verify this change.

Diff Detail

Event Timeline

shafik created this revision.Aug 22 2019, 10:49 AM
aprantl added inline comments.Aug 22 2019, 11:03 AM
950 ↗(On Diff #216663)

Please be sure to add more context the diffs in the future (git diff -U9999).

11 ↗(On Diff #216663)

Why check for the calling convention in a test called export-symbol-anonymous-class.ll ?

11 ↗(On Diff #216663)

ahh.. because the checks are exhaustive?

14 ↗(On Diff #216663)

Can you check that this is the inner nested struct by using a combination of CHECK-NEXT and CHECK-NOT: NULL?

This comment was removed by dblaikie.

(oops, nevermind my last - I hastily assumed this was the LLDB change to use export_symbols, rather than the llvm side to emit it)

aprantl accepted this revision.Aug 22 2019, 1:35 PM
This revision is now accepted and ready to land.Aug 22 2019, 1:35 PM
shafik updated this revision to Diff 216710.Aug 22 2019, 2:08 PM
shafik marked 4 inline comments as done.
  • Adding more context
  • Adjusting the test to be more strict
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2019, 2:01 PM
Herald added a subscriber: hiraditya. · View Herald Transcript