[Debugify] Don't apply DI before the bitcode writer pass

Applying synthetic debug info before the bitcode writer pass has no
testing-related purpose. This commit prevents that from happening.

It also adds tests which check that IR produced with/without
-debugify-each enabled is identical after stripping. This makes it
possible to check that individual passes (or full pipelines) are
invariant to debug info.

llvm-svn: 333861
This commit is contained in:
Vedant Kumar
2018-06-04 00:11:49 +00:00
parent 0d0f43731c
commit 56aff921dc
4 changed files with 29 additions and 3 deletions
+4
View File
@@ -80,3 +80,7 @@ ModulePass *llvm::createBitcodeWriterPass(raw_ostream &Str,
return new WriteBitcodePass(Str, ShouldPreserveUseListOrder,
EmitSummaryIndex, EmitModuleHash);
}
bool llvm::isBitcodeWriterPass(Pass *P) {
return P->getPassID() == (llvm::AnalysisID)&WriteBitcodePass::ID;
}