[Lldb-commits] [lldb] [lldb] Make single-argument Address constructor explicit (NFC) (PR #189035)

Sergei Barannikov via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 27 09:58:59 PDT 2026


================
@@ -160,7 +160,7 @@ class Address {
   ///     A list of sections, one of which may contain the \a file_addr.
   Address(lldb::addr_t file_addr, const SectionList *section_list);
 
-  Address(lldb::addr_t abs_addr);
+  explicit Address(lldb::addr_t abs_addr);
----------------
s-barannikov wrote:

I was thinking that we might want to remove the "file address"-resolving constructor accepting `section_list`. Internally, it just calls `ResolveAddressUsingFileSections()` method, but has no way of propagating its return value (a boolean indicating whether the address was actually resolved).

Note that we don't have "load address"-resolving constructor; we use `SetLoadAddress()` instead.


https://github.com/llvm/llvm-project/pull/189035


More information about the lldb-commits mailing list