summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt
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/tools/opt
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/tools/opt')
-rw-r--r--llvm/tools/opt/opt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index 09f3ac82428..f1221819f62 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -269,8 +269,8 @@ public:
using super = legacy::PassManager;
void add(Pass *P) override {
- bool WrapWithDebugify =
- DebugifyEach && !P->getAsImmutablePass() && !isIRPrintingPass(P);
+ bool WrapWithDebugify = DebugifyEach && !P->getAsImmutablePass() &&
+ !isIRPrintingPass(P) && !isBitcodeWriterPass(P);
if (!WrapWithDebugify) {
super::add(P);
return;
OpenPOWER on IntegriCloud