[PATCH] D62541: Adding a function for setting coverage output file.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 14:13:27 PDT 2019


davidxl added inline comments.


================
Comment at: compiler-rt/lib/profile/InstrProfiling.h:182
+ */
+void __llvm_profile_enable_merge(int EnableMerge);
+
----------------
this interface should not be used seperately, so it is better to merge this with llvm_profile_set_file_object(FILE*, in enableMering)


================
Comment at: compiler-rt/lib/profile/InstrProfilingFile.c:253
+  if (ProfileFile) {
+#if !defined(_WIN32)
+    fd = fileno(ProfileFile);
----------------
Add lprofLockFileHandle utility in InstrProfilingUtil.c


================
Comment at: compiler-rt/lib/profile/InstrProfilingFile.c:306
 
-  fclose(OutputFile);
+#if !defined(_WIN32)
+  if (doMerging()) {
----------------
What is this for? Why locking the file again?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62541/new/

https://reviews.llvm.org/D62541





More information about the llvm-commits mailing list