aboutsummaryrefslogtreecommitdiff
path: root/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
commitf66cfed61f1c7d664963b304bfa6cd5759b47381 (patch)
treee639642c6be96247d4a64bc1eeca400619064a79 /tools/opt
parent701cfb8f8295ce6801333bb51fbb8c279722080c (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/opt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 09f3ac82428..f1221819f62 100644
--- a/tools/opt/opt.cpp
+++ b/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;