From 3ac802a1f65f71c739f58c2f49ee967e99ba3170 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Tue, 19 Sep 2017 23:00:59 +0000 Subject: Add override for ClangDiagnosticHandler::isAnyRemarkEnabled() This is used by the new closure-based variant of OptimizationRemarkEmitter::emit(). llvm-svn: 313693 --- clang/lib/CodeGen/CodeGenAction.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenAction.cpp') diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 3873ef4eb58..b6caa50381e 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -67,6 +67,12 @@ namespace clang { CodeGenOpts.OptimizationRemarkPattern->match(PassName)); } + bool isAnyRemarkEnabled() const override { + return (CodeGenOpts.OptimizationRemarkAnalysisPattern || + CodeGenOpts.OptimizationRemarkMissedPattern || + CodeGenOpts.OptimizationRemarkPattern); + } + private: const CodeGenOptions &CodeGenOpts; BackendConsumer *BackendCon; -- cgit v1.2.3