summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/VTableBuilder.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-10-10 19:26:22 +0000
committerJustin Lebar <jlebar@google.com>2016-10-10 19:26:22 +0000
commit76d4defe4159793d7ce471adc11273a2cab28632 (patch)
treea4729d1e11608d5d51b3c2dc044a48c1a9f67085 /clang/lib/AST/VTableBuilder.cpp
parentb2f0f057421309b628d51b4c260392d228c4993a (diff)
downloadbcm5719-llvm-76d4defe4159793d7ce471adc11273a2cab28632.tar.gz
bcm5719-llvm-76d4defe4159793d7ce471adc11273a2cab28632.zip
[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. llvm-svn: 283790
Diffstat (limited to 'clang/lib/AST/VTableBuilder.cpp')
-rw-r--r--clang/lib/AST/VTableBuilder.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp
index e4d51ee1ef8..46308c2e506 100644
--- a/clang/lib/AST/VTableBuilder.cpp
+++ b/clang/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<std::reference_wrapper<VPtrInfo>, 2> PathsSorted(
- llvm::make_pointee_iterator(Paths.begin()),
- llvm::make_pointee_iterator(Paths.end()));
+ llvm::SmallVector<std::reference_wrapper<VPtrInfo>, 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;
OpenPOWER on IntegriCloud