[all-commits] [llvm/llvm-project] dfb864: [TableGen] Use heterogenous lookups with std::map ...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Tue Nov 12 10:09:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dfb864a735da9153ab8a4bb107d4b01ac81ee364
      https://github.com/llvm/llvm-project/commit/dfb864a735da9153ab8a4bb107d4b01ac81ee364
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-11-12 (Tue, 12 Nov 2024)

  Changed paths:
    M clang/utils/TableGen/ClangDiagnosticsEmitter.cpp

  Log Message:
  -----------
  [TableGen] Use heterogenous lookups with std::map (NFC) (#115810)

Heterogenous lookups allow us to call find with StringRef, avoiding a
temporary heap allocation of std::string.

This patch introduces alias:

  using DiagsInGroup = std::map<std::string, GroupInfo, std::less<>>;

because the raw type is a bit mouthful.



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