[profile] Add llvm_gcov_flush to be called outside a shared library
authorChih-Hung Hsieh <chh@google.com>
Fri, 29 Jun 2018 21:45:55 +0000 (21:45 +0000)
committerChih-Hung Hsieh <chh@google.com>
Fri, 29 Jun 2018 21:45:55 +0000 (21:45 +0000)
commit7222e8e30bbd80e5fe93265e3d94ec36d55dc787
tree5f28a8503a3d1f5f864cfd9464e7c85732b5b213
parent5cc0e25324dc3984c89a5e0b57b29ce65d52ab1e
[profile] Add llvm_gcov_flush to be called outside a shared library

__gcov_flush is hidden.
For applications to dump profiling data of selected .so files,
they can use dlsym to find and call llvm_gcov_flush in each .so file.

Differential Revision: https://reviews.llvm.org/D45454

llvm-svn: 336019
compiler-rt/lib/profile/GCDAProfiling.c
compiler-rt/test/profile/Inputs/instrprof-dlopen-dlclose-main.c