[all-commits] [llvm/llvm-project] c17da8: Support: Avoid std::tie in Support/FileSystem/Uniq...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Mon Nov 2 10:32:21 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c17da8676a0ccdf3039b37d9fabb7062ab98070c
      https://github.com/llvm/llvm-project/commit/c17da8676a0ccdf3039b37d9fabb7062ab98070c
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2020-11-02 (Mon, 02 Nov 2020)

  Changed paths:
    M llvm/include/llvm/Support/FileSystem.h
    M llvm/include/llvm/Support/FileSystem/UniqueID.h
    M llvm/unittests/Support/CMakeLists.txt
    A llvm/unittests/Support/FSUniqueIDTest.cpp

  Log Message:
  -----------
  Support: Avoid std::tie in Support/FileSystem/UniqueID.h, NFC

Running `-fsyntax-only` on UniqueID.h is 2x faster with this patch
(which avoids calling `std::tie` for `operator<`).  Since the transitive
includers of this file will go up as `FileEntryRef` gets used in more
places, avoid that compile-time hit.  This is a follow-up to
23ed570af1cc165afea1b70a533a4a39d6656501 (suggested by Reid Kleckner).

Also drop the `<tuple>` include from FileSystem.h (which was vestigal
from before UniqueID.h was split out).

Differential Revision: https://reviews.llvm.org/D90471




More information about the All-commits mailing list