From: Justin Lebar Date: Mon, 10 Oct 2016 19:26:22 +0000 (+0000) Subject: [AST] Don't use make_pointee_iterator in VTableBuilder. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f8778c83ac34f51f6c54f577acd738c11e1a0a5;p=clang [AST] Don't use make_pointee_iterator in VTableBuilder. Our implementation of make_pointee_iterator seems to be causing MSVC 2015 to crash, so I'm going to remove it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283790 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/VTableBuilder.cpp b/lib/AST/VTableBuilder.cpp index e4d51ee1ef..46308c2e50 100644 --- a/lib/AST/VTableBuilder.cpp +++ b/lib/AST/VTableBuilder.cpp @@ -3361,9 +3361,10 @@ static bool rebucketPaths(VPtrInfoVector &Paths) { // sorted vector to implement a multiset to form the buckets. Note that the // ordering is based on pointers, but it doesn't change our output order. The // current algorithm is designed to match MSVC 2012's names. - llvm::SmallVector, 2> PathsSorted( - llvm::make_pointee_iterator(Paths.begin()), - llvm::make_pointee_iterator(Paths.end())); + llvm::SmallVector, 2> PathsSorted; + PathsSorted.reserve(Paths.size()); + for (auto& P : Paths) + PathsSorted.push_back(*P); std::sort(PathsSorted.begin(), PathsSorted.end(), [](const VPtrInfo &LHS, const VPtrInfo &RHS) { return LHS.MangledPath < RHS.MangledPath;