AsmPrinter: Create a unified .debug_loc stream
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DIEHash.cpp
index da7252ade7dd5f4303296ac30896dea337afce99..a2e5aad96570f275553b015812a1deb1b7bb9ed4 100644 (file)
@@ -285,8 +285,8 @@ void DIEHash::hashBlockData(const SmallVectorImpl<DIEValue *> &Values) {
 void DIEHash::hashLocList(const DIELocList &LocList) {
   HashingByteStreamer Streamer(*this);
   DwarfDebug &DD = *AP->getDwarfDebug();
-  for (const auto &Entry :
-       DD.getDebugLocEntries()[LocList.getValue()].List)
+  const DebugLocStream &Locs = DD.getDebugLocs();
+  for (const auto &Entry : Locs.getEntries(Locs.getList(LocList.getValue())))
     DD.emitDebugLocEntry(Streamer, Entry);
 }