summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-05-30 21:45:59 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-05-30 21:45:59 +0000
commit6ada11f13466a758597f912156be47ffca2e1408 (patch)
tree674f255cda23a10d29d2f08eba7622a101b28d5b /llvm/lib/LTO/LTO.cpp
parent31f1939848397e52617506e1a5af8035f4405a82 (diff)
downloadbcm5719-llvm-6ada11f13466a758597f912156be47ffca2e1408.tar.gz
bcm5719-llvm-6ada11f13466a758597f912156be47ffca2e1408.zip
[Remarks][NFC] Move the serialization to lib/Remarks
Separate the remark serialization to YAML from the LLVM Diagnostics. This adds a new serialization abstraction: remarks::Serializer. It's completely independent from lib/IR and it provides an easy way to replace YAML by providing a new remarks::Serializer. Differential Revision: https://reviews.llvm.org/D62632 llvm-svn: 362160
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index ce1b0a1e4f6..882b15525c1 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -1356,8 +1356,9 @@ lto::setupOptimizationRemarks(LLVMContext &Context,
llvm::make_unique<ToolOutputFile>(Filename, EC, sys::fs::F_None);
if (EC)
return errorCodeToError(EC);
- Context.setRemarkStreamer(
- llvm::make_unique<RemarkStreamer>(Filename, DiagnosticFile->os()));
+ Context.setRemarkStreamer(llvm::make_unique<RemarkStreamer>(
+ Filename,
+ llvm::make_unique<remarks::YAMLSerializer>(DiagnosticFile->os())));
if (!LTORemarksPasses.empty())
if (Error E = Context.getRemarkStreamer()->setFilter(LTORemarksPasses))
OpenPOWER on IntegriCloud