[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

Stephen Hines via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 29 11:02:12 PDT 2018


srhines added a comment.

Thanks for picking this up again and updating the change to add llvm_gcov_flush().



================
Comment at: test/profile/Inputs/instrprof-dlopen-dlclose-main.c:20
+  void (*gcov_flush)() = (void (*)())dlsym(f1_handle, "__gcov_flush");
+  if (gcov_flush != NULL) {
+    fprintf(stderr, "__gcov_flush should not be visible in func.shared'\n");
----------------
Should also clear dlerror() before this call and check that dlerror() returned a non-NULL pointer indicating that this search failed.


https://reviews.llvm.org/D45454





More information about the cfe-commits mailing list