]> granicus.if.org Git - clang/commitdiff
[Remarks][NFC] Move the serialization to lib/Remarks
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Thu, 30 May 2019 21:45:59 +0000 (21:45 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Thu, 30 May 2019 21:45:59 +0000 (21:45 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362160 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenAction.cpp

index 1f61dc37834ecd9005ed549c343bbc9e40dfecaa..7671010fc98cfda3b6989197644d148e449ec00b 100644 (file)
@@ -279,7 +279,8 @@ namespace clang {
         }
 
         Ctx.setRemarkStreamer(llvm::make_unique<RemarkStreamer>(
-            CodeGenOpts.OptRecordFile, OptRecordFile->os()));
+            CodeGenOpts.OptRecordFile,
+            llvm::make_unique<remarks::YAMLSerializer>(OptRecordFile->os())));
 
         if (!CodeGenOpts.OptRecordPasses.empty())
           if (Error E = Ctx.getRemarkStreamer()->setFilter(