================
@@ -407,6 +406,15 @@ CompileUnit *Function::GetCompileUnit() { return
m_comp_unit; }
const CompileUnit *Function::GetCompileUnit() const { return m_comp_unit; }
+Address Function::GetAddress() const {
+ if (m_ranges.empty())
+ return Address();
+ // We're using a (DWARF-like) convention where the base address of the first
+ // interval denotes the entry point of the function. If that turns out to be
+ // insufficient, we can introduce a separate "entry point address" field.
+ return m_ranges[0].GetBaseAddress();
----------------
jasonmolenda wrote:
Function::CollapseRanges seems to imply that the first Range may not have the
lowest address of all ranges. Should this return `m_range.GetBaseAddress()`
using `CollapseRanges`'s calculation intsead?
https://github.com/llvm/llvm-project/pull/115836
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits