This is an archive of the discontinued LLVM Phabricator instance.

ManualDWARFIndex: Treat DW_TAG_subprogram and DW_TAG_inlined_subroutine the same way
ClosedPublic

Authored by labath on May 25 2018, 5:16 AM.

Details

Summary

We were treating subprograms and inlined subroutines differently when
building the index. The difference was in which indexes were individual
tags inserted (subprograms went to all indexes, where as inlined
subroutines only into the basename and full name indexes).

This seems like an error, because an inlined subroutine can still
represent an C++ or an ObjC method. I don't see anything in the
subprogram branch which should not apply to an inlined subroutine, so I
propose to just treat them identically. This makes searching for an
inlined method behave the same way as for the apple index.

I write an assembly-based test because I did not want to depend on
particular clang inlining behavior (and because I wanted to see how hard
would it be).

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.May 25 2018, 5:16 AM
clayborg accepted this revision.May 25 2018, 4:19 PM
This revision is now accepted and ready to land.May 25 2018, 4:19 PM
This revision was automatically updated to reflect the committed changes.