summaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-03 19:58:30 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-03 19:58:30 +0000
commit9efaf2f2dad82d5455970af0370edace405791b2 (patch)
treecf6d02ff476e90daf6c9b3a78cfbcfbc59570f96 /include/llvm/Support
parentc3835ccef9c8d4d63ba2ec5c7c6c4cb18ee46d49 (diff)
downloadllvm-9efaf2f2dad82d5455970af0370edace405791b2.tar.gz
llvm-9efaf2f2dad82d5455970af0370edace405791b2.tar.bz2
llvm-9efaf2f2dad82d5455970af0370edace405791b2.tar.xz
[C++11] Use std::tie to simplify compare operators.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/FileSystem.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h
index 6f7dc315e8..c0b2d551d3 100644
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -135,8 +135,7 @@ public:
}
bool operator!=(const UniqueID &Other) const { return !(*this == Other); }
bool operator<(const UniqueID &Other) const {
- return Device < Other.Device ||
- (Device == Other.Device && File < Other.File);
+ return std::tie(Device, File) < std::tie(Other.Device, Other.File);
}
uint64_t getDevice() const { return Device; }
uint64_t getFile() const { return File; }