From bd3306aecb3a15e8967143b8cdbbccf2b1b19b74 Mon Sep 17 00:00:00 2001 From: patrick Date: Sat, 14 Jan 2017 19:55:43 +0000 Subject: Import LLVM 3.9.1 including clang and lld. --- gnu/llvm/tools/clang/lib/Serialization/ModuleManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/llvm/tools/clang/lib/Serialization/ModuleManager.cpp') diff --git a/gnu/llvm/tools/clang/lib/Serialization/ModuleManager.cpp b/gnu/llvm/tools/clang/lib/Serialization/ModuleManager.cpp index 74f75a103f7..292f36dfeb2 100644 --- a/gnu/llvm/tools/clang/lib/Serialization/ModuleManager.cpp +++ b/gnu/llvm/tools/clang/lib/Serialization/ModuleManager.cpp @@ -320,11 +320,11 @@ void ModuleManager::visit(llvm::function_ref Visitor, Queue.reserve(N); llvm::SmallVector UnusedIncomingEdges; UnusedIncomingEdges.resize(size()); - for (auto M = rbegin(), MEnd = rend(); M != MEnd; ++M) { - unsigned Size = (*M)->ImportedBy.size(); - UnusedIncomingEdges[(*M)->Index] = Size; + for (ModuleFile *M : llvm::reverse(*this)) { + unsigned Size = M->ImportedBy.size(); + UnusedIncomingEdges[M->Index] = Size; if (!Size) - Queue.push_back(*M); + Queue.push_back(M); } // Traverse the graph, making sure to visit a module before visiting any -- cgit v1.2.3-59-g8ed1b