From b5beb97b07ce7e5f868373543537bed3c471a796 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Wed, 29 Jun 2016 04:55:31 +0000 Subject: [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. llvm-svn: 274101 --- clang/lib/CodeGen/CodeGenAction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenAction.cpp') diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 88618405165..163cda1b88f 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/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( -- cgit v1.2.3