[PATCH] D121927: [Clang] Work with multiple pragmas weak before definition
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 23 11:38:18 PDT 2022
aaron.ballman added inline comments.
================
Comment at: clang/include/clang/Sema/Weak.h:47
+ static unsigned getHashValue(const WeakInfo &W) {
+ return W.getAlias() ? DenseMapInfo::getHashValue(W.getAlias()->getName())
+ : DenseMapInfo::getHashValue("");
----------------
hubert.reinterpretcast wrote:
> The fact that `WeakUndeclaredIdentifiers` is keyed by `IdentifierInfo *` must mean that it is safe to use pointer comparison. This is further bolstered by `IdentifierInfo` having only private or deleted constructors (with `IdentifierTable` being a friend class).
>
> I will adjust to make this class simply forward to `DenseMapInfo<const IdentifierInfo *>` with the alias members.
SGTM!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121927/new/
https://reviews.llvm.org/D121927
More information about the cfe-commits
mailing list