]> granicus.if.org Git - llvm/commitdiff
Use the new member accessors of llvm::enumerate.
authorZachary Turner <zturner@google.com>
Mon, 13 Mar 2017 16:32:08 +0000 (16:32 +0000)
committerZachary Turner <zturner@google.com>
Mon, 13 Mar 2017 16:32:08 +0000 (16:32 +0000)
The value_type is no longer a struct, it's a class whose
members you have to access via a method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297635 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cov/CoverageReport.cpp

index 6ae64ba8a3ab0215160ceb7a0a31e25d24549930..c68bb9048df1b18bf39fbeeb1f4cd8ee93022d3f 100644 (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;
       }
     }