]> granicus.if.org Git - llvm/commitdiff
Merging r342354:
authorTom Stellard <tstellar@redhat.com>
Fri, 2 Nov 2018 02:46:33 +0000 (02:46 +0000)
committerTom Stellard <tstellar@redhat.com>
Fri, 2 Nov 2018 02:46:33 +0000 (02:46 +0000)
------------------------------------------------------------------------
r342354 | kristina | 2018-09-16 15:21:59 -0700 (Sun, 16 Sep 2018) | 11 lines

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

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@345923 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 500e7a00196feaa1992c47f0b628becf29746b1a..19b3afef34b55181cf69140e01bcbefbac83c996 100644 (file)
@@ -2127,7 +2127,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();
         });
   };