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

Egor Zhdan via All-commits all-commits at lists.llvm.org
Thu Jul 18 05:27:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c5f402f95d9617882b26d5799f503383b895c2e4
      https://github.com/llvm/llvm-project/commit/c5f402f95d9617882b26d5799f503383b895c2e4
  Author: Egor Zhdan <e_zhdan at apple.com>
  Date:   2024-07-18 (Thu, 18 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