diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-10-28 14:53:31 -0700 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2020-02-04 17:16:02 -0800 |
commit | 7531a5039fd7ee9b48eb8a0d0770e8dfb9fa8bdf (patch) | |
tree | 85f6ce820fd44fcac45972f3e277ca474b2bdecc /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 1c03cc5a39f7088551151c5c6c64d58819c89369 (diff) | |
download | llvm-7531a5039fd7ee9b48eb8a0d0770e8dfb9fa8bdf.zip llvm-7531a5039fd7ee9b48eb8a0d0770e8dfb9fa8bdf.tar.gz llvm-7531a5039fd7ee9b48eb8a0d0770e8dfb9fa8bdf.tar.bz2 |
[Remarks] Extend the RemarkStreamer to support other emitters
This extends the RemarkStreamer to allow for other emitters (e.g.
frontends, SIL, etc.) to emit remarks through a common interface.
See changes in llvm/docs/Remarks.rst for motivation and design choices.
Differential Revision: https://reviews.llvm.org/D73676
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index b89b080..5ebc34c 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -32,8 +32,8 @@ #include "llvm/IR/DiagnosticPrinter.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LLVMRemarkStreamer.h" #include "llvm/IR/Module.h" -#include "llvm/IR/RemarkStreamer.h" #include "llvm/IRReader/IRReader.h" #include "llvm/Linker/Linker.h" #include "llvm/Pass.h" @@ -86,15 +86,15 @@ namespace clang { const CodeGenOptions CodeGenOpts) { handleAllErrors( std::move(E), - [&](const RemarkSetupFileError &E) { + [&](const LLVMRemarkSetupFileError &E) { Diags.Report(diag::err_cannot_open_file) << CodeGenOpts.OptRecordFile << E.message(); }, - [&](const RemarkSetupPatternError &E) { + [&](const LLVMRemarkSetupPatternError &E) { Diags.Report(diag::err_drv_optimization_remark_pattern) << E.message() << CodeGenOpts.OptRecordPasses; }, - [&](const RemarkSetupFormatError &E) { + [&](const LLVMRemarkSetupFormatError &E) { Diags.Report(diag::err_drv_optimization_remark_format) << CodeGenOpts.OptRecordFormat; }); @@ -309,7 +309,7 @@ namespace clang { CodeGenOpts, this)); Expected<std::unique_ptr<llvm::ToolOutputFile>> OptRecordFileOrErr = - setupOptimizationRemarks( + setupLLVMOptimizationRemarks( Ctx, CodeGenOpts.OptRecordFile, CodeGenOpts.OptRecordPasses, CodeGenOpts.OptRecordFormat, CodeGenOpts.DiagnosticsWithHotness, CodeGenOpts.DiagnosticsHotnessThreshold); @@ -1150,7 +1150,7 @@ void CodeGenAction::ExecuteAction() { std::make_unique<ClangDiagnosticHandler>(CodeGenOpts, &Result)); Expected<std::unique_ptr<llvm::ToolOutputFile>> OptRecordFileOrErr = - setupOptimizationRemarks( + setupLLVMOptimizationRemarks( Ctx, CodeGenOpts.OptRecordFile, CodeGenOpts.OptRecordPasses, CodeGenOpts.OptRecordFormat, CodeGenOpts.DiagnosticsWithHotness, CodeGenOpts.DiagnosticsHotnessThreshold); |