[clang][modules] NFC: Only sort interesting identifiers
authorJan Svoboda <jan_svoboda@apple.com>
Mon, 15 May 2023 20:28:07 +0000 (13:28 -0700)
committerJan Svoboda <jan_svoboda@apple.com>
Mon, 15 May 2023 20:28:10 +0000 (13:28 -0700)
commitf60cc473b82b16edc448199c84e612c1e5c3014c
treeb17cf89c22175e19d854dc5b14fb2f60d282ebea
parent039b28e14e6d5a4b9b9b333695dabe9dc57233b0
[clang][modules] NFC: Only sort interesting identifiers

In 9c254184 `ASTWriter` stopped writing identifiers that are not interesting. Taking it a bit further, we don't need to sort the whole identifier table, just the interesting identifiers. This reduces the size of sorted vector from ~10k (including lots of builtins) to 2 (`__VA_ARGS__` and `__VA_OPT__`) in a typical Xcode project, improving `clang-scan-deps` performance.

Reviewed By: benlangmuir

Differential Revision: https://reviews.llvm.org/D150494
clang/lib/Serialization/ASTWriter.cpp