[PATCH] D52142: [DebugInfo] Fix build when std::vector::iterator is a pointer

Orivej Desh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 15 16:36:36 PDT 2018


orivej created this revision.
orivej added reviewers: hans, wolfgangp, probinson, echristo, dblaikie.
Herald added subscribers: llvm-commits, JDevlieghere.

std::vector::iterator type may be a pointer, then iterator::value_type is invalid.


Repository:
  rL LLVM

https://reviews.llvm.org/D52142

Files:
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp


Index: lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2186,7 +2186,7 @@
 
   auto NoRangesPresent = [this]() {
     return llvm::all_of(
-        CUMap, [](const decltype(CUMap)::const_iterator::value_type &Pair) {
+        CUMap, [](const decltype(CUMap)::value_type &Pair) {
           return Pair.second->getRangeLists().empty();
         });
   };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52142.165665.patch
Type: text/x-patch
Size: 499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180915/77c3191a/attachment.bin>


More information about the llvm-commits mailing list