[DebugInfo] Fix build when std::vector::iterator is a pointer
authorKristina Brooks <kristina@nym.hush.com>
Sun, 16 Sep 2018 22:21:59 +0000 (22:21 +0000)
committerKristina Brooks <kristina@nym.hush.com>
Sun, 16 Sep 2018 22:21:59 +0000 (22:21 +0000)
std::vector::iterator type may be a pointer, then
iterator::value_type fails to compile since iterator is not a class,
namespace, or enumeration.

Patch by orivej (Orivej Desh)

Differential Revision: https://reviews.llvm.org/D52142

llvm-svn: 342354

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 4cb9fc6..78d11fb 100644 (file)
@@ -2186,7 +2186,7 @@ void DwarfDebug::emitDebugRanges() {
 
   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();
         });
   };