This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Make DWARF ignore sizes on forward declared class types.
ClosedPublic

Authored by akhuang on Sep 2 2020, 8:46 PM.

Details

Summary

Make sure the sizes for forward declared classes aren't emitted in
DWARF.

This comes before https://reviews.llvm.org/D87062, which adds sizes to
all classes with definitions.

Bug: https://bugs.llvm.org/show_bug.cgi?id=47338

Diff Detail

Event Timeline

akhuang created this revision.Sep 2 2020, 8:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2020, 8:46 PM
akhuang requested review of this revision.Sep 2 2020, 8:46 PM
dblaikie accepted this revision.Sep 2 2020, 9:19 PM

Looks good - thanks!

llvm/test/DebugInfo/X86/struct-fwd-decl.ll
17–22

Thinking about it, perhaps this'd be easier written as:

; CHECK: DW_TAG_structure_type
; CHECK-NOT: DW_AT_byte_size
; CHECK: {{NULL|DW_TAG}}

(I realize, ultimately, this isn't far off just "CHECK-NOT: DW_AT_byte_size" in general, but I think it's probably a good balance)

This revision is now accepted and ready to land.Sep 2 2020, 9:19 PM
akhuang added inline comments.Sep 3 2020, 11:00 AM
llvm/test/DebugInfo/X86/struct-fwd-decl.ll
17–22

sure, this seems reasonable

akhuang updated this revision to Diff 289766.Sep 3 2020, 11:01 AM

update test

This revision was landed with ongoing or failed builds.Sep 3 2020, 11:02 AM
This revision was automatically updated to reflect the committed changes.