This is an archive of the discontinued LLVM Phabricator instance.

Debug Info: Support for DW_AT_export_symbols for anonymous structs
ClosedPublic

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

Details

Summary

This implements the DWARF 5 feature described in:

http://dwarfstd.org/ShowIssue.php?issue=141212.1

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
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
950 ↗(On Diff #216663)

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

test/DebugInfo/Generic/export-symbol-anonymous-class.ll
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