[all-commits] [llvm/llvm-project] 5e9f24: [lldb] Make LanguageRuntime::GetTypeBitSize return...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Jun 20 10:46:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e9f247c064cb2361cd641f62eb4b7049d21641a
      https://github.com/llvm/llvm-project/commit/5e9f247c064cb2361cd641f62eb4b7049d21641a
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2024-06-20 (Thu, 20 Jun 2024)

  Changed paths:
    M lldb/include/lldb/Target/LanguageRuntime.h
    M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

  Log Message:
  -----------
  [lldb] Make LanguageRuntime::GetTypeBitSize return an optional (NFC) (#96013)

Make LanguageRuntime::GetTypeBitSize return an optional. This should be
NFC, though the ObjCLanguageRuntime implementation is (possibly) more
defensive against returning 0.

I'm not sure if it's possible for both `m_ivar.size` and `m_ivar.offset`
to be zero. Previously, we'd return 0 and cache it, only to discard it
the next time when finding it in the cache, and recomputing it again.
The new code will avoid putting it in the cache in the first place.



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