summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2017-01-26 04:03:18 +0000
committerAdam Nemet <anemet@apple.com>2017-01-26 04:03:18 +0000
commit1e0d16cfffcfac8094700e934d3e098883c8a131 (patch)
tree4e093b00a96af0b7f0e85af1cfb0827a19b1ef93
parent80166d4afebd22eccc43e545585ba514f0d792cd (diff)
downloadbcm5719-llvm-1e0d16cfffcfac8094700e934d3e098883c8a131.tar.gz
bcm5719-llvm-1e0d16cfffcfac8094700e934d3e098883c8a131.zip
[OptDiag] Predicates to check the same type of IR and MIR opt remarks
It will be used from clang. llvm-svn: 293145
-rw-r--r--llvm/include/llvm/IR/DiagnosticInfo.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h
index 23b37a08a85..8361c577f9e 100644
--- a/llvm/include/llvm/IR/DiagnosticInfo.h
+++ b/llvm/include/llvm/IR/DiagnosticInfo.h
@@ -451,6 +451,21 @@ public:
DI->getKind() <= DK_LastMachineRemark);
}
+ bool isPassed() const {
+ return (getKind() == DK_OptimizationRemark ||
+ getKind() == DK_MachineOptimizationRemark);
+ }
+
+ bool isMissed() const {
+ return (getKind() == DK_OptimizationRemarkMissed ||
+ getKind() == DK_MachineOptimizationRemarkMissed);
+ }
+
+ bool isAnalysis() const {
+ return (getKind() == DK_OptimizationRemarkAnalysis ||
+ getKind() == DK_MachineOptimizationRemarkAnalysis);
+ }
+
protected:
/// Name of the pass that triggers this report. If this matches the
/// regular expression given in -Rpass=regexp, then the remark will
OpenPOWER on IntegriCloud