[PATCH] D14468: Add zero size dummy data to ensure section symbol is always created

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 12:32:19 PST 2015


davidxl updated this revision to Diff 40079.
davidxl added a comment.

The change does not apply to Darwin as on Darwin, we still pay the overhead of emitting the runtime hook user function and does not use -u,symbol trick -- so when no module is instrumented, the runtime library won't linked in.

An extensive test case is added for shared library PGO -- it covers all possible scenarios -- it is better to have a black box testing without need to check the implementation detail.

Also suppressed the pedantic warning for zero size array.


http://reviews.llvm.org/D14468

Files:
  lib/profile/CMakeLists.txt
  lib/profile/InstrProfilingBuffer.c
  lib/profile/InstrProfilingFile.c
  lib/profile/InstrProfilingPlatformLinux.c
  test/profile/Inputs/instrprof-shared-lib.c
  test/profile/Inputs/instrprof-shared-main.c
  test/profile/instrprof-shared.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14468.40079.patch
Type: text/x-patch
Size: 7273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151112/3ac26994/attachment.bin>


More information about the llvm-commits mailing list