[gcov/Darwin] Ensure external symbols are exported when using an export list
authorVedant Kumar <vsk@apple.com>
Mon, 3 Dec 2018 20:53:58 +0000 (20:53 +0000)
committerVedant Kumar <vsk@apple.com>
Mon, 3 Dec 2018 20:53:58 +0000 (20:53 +0000)
commit6b062cd694d472ba80680aa5233f018609d83fe8
tree2ed99752ea7fc65317f6334c016e59099880221a
parent97a4590b33f01bb3bf3ff7a7ae51462010d53d66
[gcov/Darwin] Ensure external symbols are exported when using an export list

Make sure that symbols needed to implement runtime support for gcov are
exported when using an export list on Darwin.

Without the clang driver exporting these symbols, the linker hides them,
resulting in tapi verification failures.

rdar://45944768

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

llvm-svn: 348187
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChain.cpp
clang/lib/Driver/ToolChains/Darwin.cpp
clang/test/Driver/darwin-ld.c
compiler-rt/test/profile/instrprof-darwin-exports.c