From: Craig Topper Date: Tue, 14 Nov 2017 08:48:28 +0000 (+0000) Subject: [NewPassManager] Pass the -fdebug-pass-manager flag setting into the Analysis manager... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93556e376b123243b8118325279c1f3c3b4d2582;p=clang [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 --- 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(); });