Bladeren bron

[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362160 91177308-0d34-0410-b5e6-96231b3b80d8
Francis Visoiu Mistrih 6 jaren geleden
bovenliggende
commit
aa3cc5e20a
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      lib/CodeGen/CodeGenAction.cpp

+ 2 - 1
lib/CodeGen/CodeGenAction.cpp

@@ -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(