[PATCH] D15211: [ProfileData] Add unit test infrastructure for sample profile reader/writer

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 14:39:22 PST 2015


davidxl added inline comments.

================
Comment at: include/llvm/ProfileData/SampleProfWriter.h:32
@@ -31,4 +31,3 @@
 public:
-  SampleProfileWriter(StringRef Filename, std::error_code &EC,
-                      sys::fs::OpenFlags Flags)
-      : OS(Filename, EC, Flags) {}
+  SampleProfileWriter(raw_ostream &OutputStream)
+      : OS(OutputStream) {}
----------------
Should it be protected?

================
Comment at: include/llvm/ProfileData/SampleProfWriter.h:61
@@ -61,3 +60,3 @@
   static ErrorOr<std::unique_ptr<SampleProfileWriter>>
-  create(StringRef Filename, SampleProfileFormat Format);
+  create(raw_ostream &OutputStream, SampleProfileFormat Format);
 
----------------
why changing this interface? It is not like the stream based create method is used multiple different places.


http://reviews.llvm.org/D15211





More information about the llvm-commits mailing list