From 91071298a03083a4023fd6c12f31f04d98dd1eb5 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Wed, 29 Jun 2016 04:55:31 +0000 Subject: [PATCH] [Diag] Add getter shouldAlwaysPrint. NFC For the new hotness attribute, the API will take the pass rather than the pass name so we can no longer play the trick of AlwaysPrint being a special pass name. This adds a getter to help the transition. There is also a corresponding llvm patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274101 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenAction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index 8861840516..163cda1b88 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -535,7 +535,7 @@ void BackendConsumer::OptimizationRemarkHandler( // llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a // regular expression that matches the name of the pass name in \p D. - if (D.getPassName() == llvm::DiagnosticInfo::AlwaysPrint || + if (D.shouldAlwaysPrint() || (CodeGenOpts.OptimizationRemarkAnalysisPattern && CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName()))) EmitOptimizationMessage( @@ -548,7 +548,7 @@ void BackendConsumer::OptimizationRemarkHandler( // llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a // regular expression that matches the name of the pass name in \p D. - if (D.getPassName() == llvm::DiagnosticInfo::AlwaysPrint || + if (D.shouldAlwaysPrint() || (CodeGenOpts.OptimizationRemarkAnalysisPattern && CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName()))) EmitOptimizationMessage( @@ -561,7 +561,7 @@ void BackendConsumer::OptimizationRemarkHandler( // llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a // regular expression that matches the name of the pass name in \p D. - if (D.getPassName() == llvm::DiagnosticInfo::AlwaysPrint || + if (D.shouldAlwaysPrint() || (CodeGenOpts.OptimizationRemarkAnalysisPattern && CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName()))) EmitOptimizationMessage( -- 2.50.1