Index: lib/CodeGen/AsmPrinter/DebugLocStream.h =================================================================== --- lib/CodeGen/AsmPrinter/DebugLocStream.h +++ lib/CodeGen/AsmPrinter/DebugLocStream.h @@ -154,13 +154,12 @@ DebugLocStream &Locs; AsmPrinter &Asm; DbgVariable &V; - const MachineInstr &MI; size_t ListIndex; public: ListBuilder(DebugLocStream &Locs, DwarfCompileUnit &CU, AsmPrinter &Asm, - DbgVariable &V, const MachineInstr &MI) - : Locs(Locs), Asm(Asm), V(V), MI(MI), ListIndex(Locs.startList(&CU)) {} + DbgVariable &V) + : Locs(Locs), Asm(Asm), V(V), ListIndex(Locs.startList(&CU)) {} /// Finalize the list. /// Index: lib/CodeGen/AsmPrinter/DebugLocStream.cpp =================================================================== --- lib/CodeGen/AsmPrinter/DebugLocStream.cpp +++ lib/CodeGen/AsmPrinter/DebugLocStream.cpp @@ -40,6 +40,6 @@ DebugLocStream::ListBuilder::~ListBuilder() { if (!Locs.finalizeList(Asm)) return; - V.initializeDbgValue(&MI); + assert(!V.getMInsn() && "Already initialized with a single DBG_VALUE"); V.setDebugLocListIndex(ListIndex); } Index: lib/CodeGen/AsmPrinter/DwarfDebug.cpp =================================================================== --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1355,7 +1355,7 @@ continue; // Handle multiple DBG_VALUE instructions describing one variable. - DebugLocStream::ListBuilder List(DebugLocs, TheCU, *Asm, *RegVar, *MInsn); + DebugLocStream::ListBuilder List(DebugLocs, TheCU, *Asm, *RegVar); // Build the location list for this variable. SmallVector Entries;