[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:
parent
ad437fff53
commit
b5beb97b07
|
@ -535,7 +535,7 @@ void BackendConsumer::OptimizationRemarkHandler(
|
||||||
// llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
|
// llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
|
||||||
// regular expression that matches the name of the pass name in \p D.
|
// 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 &&
|
||||||
CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName())))
|
CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName())))
|
||||||
EmitOptimizationMessage(
|
EmitOptimizationMessage(
|
||||||
|
@ -548,7 +548,7 @@ void BackendConsumer::OptimizationRemarkHandler(
|
||||||
// llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
|
// llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
|
||||||
// regular expression that matches the name of the pass name in \p D.
|
// 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 &&
|
||||||
CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName())))
|
CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName())))
|
||||||
EmitOptimizationMessage(
|
EmitOptimizationMessage(
|
||||||
|
@ -561,7 +561,7 @@ void BackendConsumer::OptimizationRemarkHandler(
|
||||||
// llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
|
// llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
|
||||||
// regular expression that matches the name of the pass name in \p D.
|
// 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 &&
|
||||||
CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName())))
|
CodeGenOpts.OptimizationRemarkAnalysisPattern->match(D.getPassName())))
|
||||||
EmitOptimizationMessage(
|
EmitOptimizationMessage(
|
||||||
|
|
Loading…
Reference in New Issue