Bitcode: Set LastDL after writing DebugLocs
[oota-llvm.git] / lib / Bitcode / Writer / BitcodeWriter.cpp
index 85a6da33a6ef242cf6573076f9f06db7b7b77156..199663d1bfd881843ce6a749c79cd848bcc88c04 100644 (file)
@@ -2135,6 +2135,8 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
       Vals.push_back(VE.getMetadataOrNullID(DL->getInlinedAt()));
       Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC, Vals);
       Vals.clear();
+
+      LastDL = DL;
     }
 
   // Emit names for all the instructions etc.