Add an Offset field to the SourceLocation for LookupResult objects.
authorGreg Clayton <gclayton@fb.com>
Sun, 16 Feb 2020 05:28:36 +0000 (21:28 -0800)
committerGreg Clayton <gclayton@fb.com>
Thu, 20 Feb 2020 00:12:32 +0000 (16:12 -0800)
commit95e3956189a6722d1ec4b6d98fb855ee257e64fe
tree8569f1905cdc5b688cfa28621846a06c6360d6ac
parent562c6b80192243b141d1ddd15d1827c860992147
Add an Offset field to the SourceLocation for LookupResult objects.

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

Reviewers: labath, aadsm, serhiy.redko, jankratochvil, xiaobai, wallace, aprantl, JDevlieghere

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74680
llvm/include/llvm/DebugInfo/GSYM/LookupResult.h
llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp
llvm/lib/DebugInfo/GSYM/InlineInfo.cpp
llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp