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
This commit is contained in:
David Blaikie
2014-03-24 22:38:38 +00:00
parent 7385c3207c
commit 0f53443d82
3 changed files with 17 additions and 33 deletions

View File

@@ -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