Support: Avoid std::tie in Support/FileSystem/UniqueID.h, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 30 Oct 2020 15:13:37 +0000 (11:13 -0400)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 2 Nov 2020 18:26:15 +0000 (13:26 -0500)
commitc17da8676a0ccdf3039b37d9fabb7062ab98070c
tree1b86a4621d97fad4febeecf1b403987e9a3bc501
parent906b9dbc9d7487ee923b6a516c36777a2be0ca35
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
llvm/include/llvm/Support/FileSystem.h
llvm/include/llvm/Support/FileSystem/UniqueID.h
llvm/unittests/Support/CMakeLists.txt
llvm/unittests/Support/FSUniqueIDTest.cpp [new file with mode: 0644]