This is an archive of the discontinued LLVM Phabricator instance.

Add an Offset field to the SourceLocation for LookupResult objects.
ClosedPublic

Authored by clayborg on Feb 15 2020, 9:29 PM.

Details

Summary

The Offset provides the offset within the function in a SourceLocation struct. This allows us to show the byte offset within a function. We also track offsets within inline functions as well. Updated the lookup tests to verify the offset for functions and inline functions.

0x1000: main + 32 @ /tmp/main.cpp:45

Diff Detail

Event Timeline

clayborg created this revision.Feb 15 2020, 9:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 15 2020, 9:29 PM
Herald added a subscriber: hiraditya. · View Herald Transcript

Anyone have time to check this patch out? Very small patch that adds function code offsets to the LookupResult struct.

This revision is now accepted and ready to land.Feb 19 2020, 11:10 AM
This revision was automatically updated to reflect the committed changes.