[all-commits] [llvm/llvm-project] 3ac5f5: [lldb][TypeSystem] Pass ClangASTMetadata by-value ...

Michael Buch via All-commits all-commits at lists.llvm.org
Wed Aug 7 05:06:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ac5f5e1fc189d0cca169a409199fdaec13112d1
      https://github.com/llvm/llvm-project/commit/3ac5f5e1fc189d0cca169a409199fdaec13112d1
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2024-08-07 (Wed, 07 Aug 2024)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
    M lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
    M lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
    M lldb/unittests/Symbol/TestTypeSystemClang.cpp

  Log Message:
  -----------
  [lldb][TypeSystem] Pass ClangASTMetadata by-value when creating record/objc types (#102296)

This is a follow-up to https://github.com/llvm/llvm-project/pull/102161
where we changed the `GetMetadata`/`SetMetadata` APIs to pass
`ClangASTMetadata` by-value, instead of `ClangASTMetadata *`, which
wasn't a very friendly API.

This patch continues from there and changes
`CreateRecordType`/`CreateObjCClass` to take the metadata by-value as
well.

As a drive-by change, I also changed `DelayedAddObjCClassProperty` to
store the metadata by-value, instead of in a `std::unique_ptr`, which
AFAICT, was done solely due to the TypeSystemClang APIs taking the
metadata by pointer. This meant we could also get rid of the
user-provided copy constructors.



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