[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
This commit is contained in:
Adam Nemet 2016-06-29 04:55:31 +00:00
parent ad437fff53
commit b5beb97b07
1 changed files with 3 additions and 3 deletions

View File

@ -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(