[all-commits] [llvm/llvm-project] 8fcad7: [APINotes] Reduce memory footprint for Obj-C/C++ c...

Egor Zhdan via All-commits all-commits at lists.llvm.org
Wed Jul 17 11:29:19 PDT 2024


  Branch: refs/heads/users/egorzhdan/apinotes-contexttablekey
  Home:   https://github.com/llvm/llvm-project
  Commit: 8fcad7fee075e59dcf38716f19de738f51d85d82
      https://github.com/llvm/llvm-project/commit/8fcad7fee075e59dcf38716f19de738f51d85d82
  Author: Egor Zhdan <e_zhdan at apple.com>
  Date:   2024-07-17 (Wed, 17 Jul 2024)

  Changed paths:
    M clang/lib/APINotes/APINotesFormat.h
    M clang/lib/APINotes/APINotesReader.cpp
    M clang/lib/APINotes/APINotesWriter.cpp

  Log Message:
  -----------
  [APINotes] Reduce memory footprint for Obj-C/C++ contexts

We were storing extraneous data for certain Objective-C/C++ entities. Specifically, for declarations that can be nested in another context (such as functions) we were storing the kind of the parent context in addition to its ID. The ID is always sufficient.

This removes the logically incorrect usages of `ContextTableKey` that don't actually describe a context, but rather describe a single declaration. This introduces `SingleDeclTableKey` to store that kind of entities in a more compact and reasonable way.



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