This is an archive of the discontinued LLVM Phabricator instance.

[dsymutil] Don't emit N_AST symbol entries in the Mach-O companion file
ClosedPublic

Authored by JDevlieghere on Jun 4 2020, 4:50 PM.

Details

Diff Detail

Event Timeline

JDevlieghere created this revision.Jun 4 2020, 4:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2020, 4:50 PM
JDevlieghere marked an inline comment as done.Jun 4 2020, 4:52 PM
JDevlieghere added inline comments.
llvm/tools/dsymutil/MachOUtils.cpp
167

Previously the code below would filter out N_OSO entries, relying on the fact that N_OSO entries come after N_SO entries. That means that technically the N_OSO could be omitted here, but I think this is much clearer.

friss added inline comments.Jun 4 2020, 5:37 PM
llvm/tools/dsymutil/MachOUtils.cpp
167

It's not only the N_OSO entries. The debugging entries are somewhat hierarchical and the top-level element is N_SO. An N_SO with a filename opens a debugging scope and another one without a name closes it. We don't transfer anything that is in the debug scope (N_OSO, N_FUN, N_ENSYM, N_BNSYM in the example I'm looking at).

JDevlieghere marked an inline comment as done.Jun 4 2020, 7:35 PM
JDevlieghere added inline comments.
llvm/tools/dsymutil/MachOUtils.cpp
167

So would you prefer to add a comment below describing this and removing it from the if clause?

friss added inline comments.Jun 4 2020, 8:50 PM
llvm/tools/dsymutil/MachOUtils.cpp
167

Yep, I think so

JDevlieghere marked 2 inline comments as done.

Address @friss' comments

friss accepted this revision.Jun 5 2020, 8:04 AM

LGTM

This revision is now accepted and ready to land.Jun 5 2020, 8:04 AM
This revision was automatically updated to reflect the committed changes.
keith added a subscriber: keith.Jun 5 2020, 1:06 PM