]> granicus.if.org Git - clang/commitdiff
[NewPassManager] Pass the -fdebug-pass-manager flag setting into the Analysis manager...
authorCraig Topper <craig.topper@intel.com>
Tue, 14 Nov 2017 08:48:28 +0000 (08:48 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 14 Nov 2017 08:48:28 +0000 (08:48 +0000)
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

index 9496f5205e910e17ae7ff4a0e52cb3904c4d1272..db936948c8760ba67636279fd02429f2407b7ba4 100644 (file)
@@ -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(); });