This is an archive of the discontinued LLVM Phabricator instance.

Support: Avoid std::tie in Support/FileSystem/UniqueID.h, NFC
ClosedPublic

Authored by dexonsmith on Oct 30 2020, 8:39 AM.

Details

Summary

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).

Diff Detail

Event Timeline

dexonsmith created this revision.Oct 30 2020, 8:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 30 2020, 8:39 AM
dexonsmith requested review of this revision.Oct 30 2020, 8:39 AM
rnk accepted this revision.Oct 30 2020, 2:53 PM

lgtm

This revision is now accepted and ready to land.Oct 30 2020, 2:53 PM