diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-24 22:38:38 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-24 22:38:38 +0000 |
commit | 0f53443d827491502a4f56728a383ea8b39cf3dd (patch) | |
tree | b1844eb684905c7b64c4e5f7cc2517ef12b4e0c4 /lib/CodeGen/AsmPrinter/DIEHash.cpp | |
parent | 7385c3207c5fa893abe91cf75e95ed36f64caf40 (diff) | |
download | llvm-0f53443d827491502a4f56728a383ea8b39cf3dd.tar.gz llvm-0f53443d827491502a4f56728a383ea8b39cf3dd.tar.bz2 llvm-0f53443d827491502a4f56728a383ea8b39cf3dd.tar.xz |
DebugInfo: Simplify debug loc list handling by keeping separate lists
Rather than using a flat list with "empty" entries (ala the actual
on-disk format), keep separate lists for each variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DIEHash.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIEHash.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIEHash.cpp b/lib/CodeGen/AsmPrinter/DIEHash.cpp index 0f5e8fb5b4..9756054b28 100644 --- a/lib/CodeGen/AsmPrinter/DIEHash.cpp +++ b/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 |