diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp index 0f5e8fb5b4b..9756054b285 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp @@ -283,22 +283,10 @@ void DIEHash::hashBlockData(const SmallVectorImpl<DIEValue *> &Values) { // Hash the contents of a loclistptr class. void DIEHash::hashLocList(const DIELocList &LocList) { - SmallVectorImpl<DebugLocEntry>::const_iterator Start = - AP->getDwarfDebug()->getDebugLocEntries().begin(); - Start += LocList.getValue(); HashingByteStreamer Streamer(*this); - for (SmallVectorImpl<DebugLocEntry>::const_iterator - I = Start, - E = AP->getDwarfDebug()->getDebugLocEntries().end(); - I != E; ++I) { - const DebugLocEntry &Entry = *I; - // Go through the entries until we hit the end of the list, - // which is the next empty entry. - if (Entry.isEmpty()) - return; - else - AP->getDwarfDebug()->emitDebugLocEntry(Streamer, Entry); - } + for (const auto &Entry : + AP->getDwarfDebug()->getDebugLocEntries()[LocList.getValue()]) + AP->getDwarfDebug()->emitDebugLocEntry(Streamer, Entry); } // Hash an individual attribute \param Attr based on the type of attribute and |