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

Use the new member accessors of llvm::enumerate.

The value_type is no longer a struct, it's a class whose
members you have to access via a method.

llvm-svn: 297635
This commit is contained in:
Zachary Turner 2017-03-13 16:32:08 +00:00
parent bb6c1699b6
commit 84ce56f415

View File

@ -132,13 +132,13 @@ unsigned getNumRedundantPathComponents(ArrayRef<std::string> Paths) {
enumerate(make_range(sys::path::begin(Path), sys::path::end(Path)))) {
// Do not increase the number of redundant components: that would remove
// useful parts of already-visited paths.
if (Component.Index >= NumRedundant)
if (Component.index() >= NumRedundant)
break;
// Lower the number of redundant components when there's a mismatch
// between the first path, and the path under consideration.
if (FirstPathComponents[Component.Index] != Component.Value) {
NumRedundant = Component.Index;
if (FirstPathComponents[Component.index()] != Component.value()) {
NumRedundant = Component.index();
break;
}
}