summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-06-04 00:11:49 +0000
committerVedant Kumar <vsk@apple.com>2018-06-04 00:11:49 +0000
commitadbd27a59972d71f70c8b8d8810e15b106a6a450 (patch)
treef3a92a306f20a17cc89b00c6f6794f3e016c1d83 /llvm/lib/Bitcode
parentf0e4321c306beb96e09b2b604b508751070204c4 (diff)
downloadbcm5719-llvm-adbd27a59972d71f70c8b8d8810e15b106a6a450.tar.gz
bcm5719-llvm-adbd27a59972d71f70c8b8d8810e15b106a6a450.zip
[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
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp4
1 files changed, 4 insertions, 0 deletions
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;
+}
OpenPOWER on IntegriCloud