[clang] [APINotes] Reduce memory footprint for Obj-C/C++ contexts (PR #99358)
Egor Zhdan via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 10:18:06 PDT 2024
================
@@ -269,12 +269,6 @@ struct ContextTableKey {
: parentContextID(parentContextID), contextKind(contextKind),
contextID(contextID) {}
- ContextTableKey(std::optional<Context> context, IdentifierID nameID)
- : parentContextID(context ? context->id.Value : (uint32_t)-1),
- contextKind(context ? static_cast<uint8_t>(context->kind)
- : static_cast<uint8_t>(-1)),
- contextID(nameID) {}
----------------
egorzhdan wrote:
This constructor was doing something that didn't make any sense: instead of storing the contextKind of the current decl, it stored the contextKind of its parent.
https://github.com/llvm/llvm-project/pull/99358
More information about the cfe-commits
mailing list