[all-commits] [llvm/llvm-project] 5a74b3: [lldb] Remove ConstString from SectionList::FindSe...

Alex Langford via All-commits all-commits at lists.llvm.org
Mon Jul 6 13:29:29 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a74b398d27ecba94fa0acf800af86039bf6a0f5
      https://github.com/llvm/llvm-project/commit/5a74b398d27ecba94fa0acf800af86039bf6a0f5
  Author: Alex Langford <alangford at apple.com>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M lldb/include/lldb/Core/Section.h
    M lldb/source/API/SBModule.cpp
    M lldb/source/API/SBSection.cpp
    M lldb/source/Commands/CommandObjectTarget.cpp
    M lldb/source/Core/Section.cpp
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    M lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    M lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
    M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    M lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
    M lldb/unittests/Core/ModuleTest.cpp
    M lldb/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
    M lldb/unittests/Symbol/LineTableTest.cpp

  Log Message:
  -----------
  [lldb] Remove ConstString from SectionList::FindSectionByName (#207296)

By having ConstString in this interface, we are forcing callers to
create a ConstString in order to perform a lookup. In many cases,
`FindSectionByName` is a best-effort interface, meaning we're creating
ConstStrings speculatively. In other cases, we were creating a
ConstString at the call-site instead of computing it once and re-using
it.

I audited all the callsites and changed all the callsites that created a
ConstString for the purpose of calling `FindSectionByName`. Other
callsites will take more time to change.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list