This is an archive of the discontinued LLVM Phabricator instance.

DWARFASTParserClang: Unify compilation unit language handling
ClosedPublic

Authored by labath on May 27 2019, 4:37 AM.

Details

Summary

The function was not being consistent in how it retrieved the language
of the current compile unit. Sometimes it did so from the lldb CU
object, and sometimes from the DWARF die. This patch unifies the
handling on the latter. The reason for choosing the DWARF method is
because I'd eventually like to stop creating lldb CUs for dwarf type
units (and so this code needs to would need to work without them).

Diff Detail

Repository
rLLDB LLDB

Event Timeline

labath created this revision.May 27 2019, 4:37 AM
labath marked an inline comment as done.May 27 2019, 4:41 AM
labath added inline comments.
source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
297

DWARFDIE::GetLanguage just fetches the (cached) language attribute from the parent DWARFUnit. The dwarf spec only speaks about this attribute in the context of top level DIEs.

clayborg accepted this revision.May 28 2019, 8:57 AM
This revision is now accepted and ready to land.May 28 2019, 8:57 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2019, 2:33 AM