From 93556e376b123243b8118325279c1f3c3b4d2582 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 14 Nov 2017 08:48:28 +0000 Subject: [PATCH] [NewPassManager] Pass the -fdebug-pass-manager flag setting into the Analysis managers to match what we do in opt Summary: Currently the -fdebug-pass-manager flag for clang doesn't enable the debug logging in the analysis managers. This is different than what the switch does when passed to opt. Reviewers: chandlerc Reviewed By: chandlerc Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D40007 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318140 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BackendUtil.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 9496f5205e..db936948c8 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -867,10 +867,10 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager( PassBuilder PB(TM.get(), PGOOpt); - LoopAnalysisManager LAM; - FunctionAnalysisManager FAM; - CGSCCAnalysisManager CGAM; - ModuleAnalysisManager MAM; + LoopAnalysisManager LAM(CodeGenOpts.DebugPassManager); + FunctionAnalysisManager FAM(CodeGenOpts.DebugPassManager); + CGSCCAnalysisManager CGAM(CodeGenOpts.DebugPassManager); + ModuleAnalysisManager MAM(CodeGenOpts.DebugPassManager); // Register the AA manager first so that our version is the one used. FAM.registerPass([&] { return PB.buildDefaultAAPipeline(); }); -- 2.40.0