Bitcode: Set LastDL after writing DebugLocs

Somehow I dropped this in r233585, and we haven't had `DEBUG_LOC_AGAIN`
records since.  Add it back.  Also tests that the output assembly looks
okay.

Fixes PR23436.

llvm-svn: 236661
This commit is contained in:
Duncan P. N. Exon Smith
2015-05-06 22:51:12 +00:00
parent 27483915e8
commit 538ef562bd
2 changed files with 38 additions and 0 deletions

View 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.