1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[CachePruning] Simplify comparator

llvm-svn: 358843
This commit is contained in:
Fangrui Song 2019-04-21 06:17:40 +00:00
parent d4fa0a36a6
commit 7b77464d28

View File

@ -35,15 +35,8 @@ struct FileInfo {
/// Used to determine which files to prune first. Also used to determine
/// set membership, so must take into account all fields.
bool operator<(const FileInfo &Other) const {
if (Time < Other.Time)
return true;
else if (Other.Time < Time)
return false;
if (Other.Size < Size)
return true;
else if (Size < Other.Size)
return false;
return Path < Other.Path;
return std::tie(Time, Other.Size, Path) <
std::tie(Other.Time, Size, Other.Path);
}
};
} // anonymous namespace