From adbd27a59972d71f70c8b8d8810e15b106a6a450 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Mon, 4 Jun 2018 00:11:49 +0000 Subject: [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 --- llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Bitcode') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp index cbed3d4495a..41212e575f8 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp @@ -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; +} -- cgit v1.2.3