================
@@ -370,6 +370,31 @@ bool SymbolContext::GetAddressRange(uint32_t scope, 
uint32_t range_idx,
   return false;
 }
 
+Address SymbolContext::GetAddress(uint32_t scope,
+                                  bool use_inline_block_range) const {
+  if ((scope & eSymbolContextLineEntry) && line_entry.IsValid())
+    return line_entry.range.GetBaseAddress();
+
+  if (scope & eSymbolContextBlock) {
+    Block *block_to_use = (block && use_inline_block_range)
+                              ? block->GetContainingInlinedBlock()
+                              : block;
+    if (block_to_use) {
+      Address addr;
+      block_to_use->GetStartAddress(addr);
+      return addr;
+    }
+  }
----------------
jimingham wrote:

I'm kind of leaning towards `GetFunctionOrSymbolAddress`, only doing what 
clearly makes sense seems best.  I also can't think of a better name.

https://github.com/llvm/llvm-project/pull/123340
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to