forked from OSchip/llvm-project
![]() This is a reland of https://reviews.llvm.org/D122336. Original patch caused a problem in collecting coverage in Fuchsia because it was returning early without putting unused function names into __llvm_prf_names section. This patch fixes that issue. The original commit message is as the following: CoverageMappingModuleGen generates a coverage mapping record even for unused functions with internal linkage, e.g. static int foo() { return 100; } Clang frontend eliminates such functions, but InstrProfiling pass still emits runtime hook since there is a coverage record. Fuchsia uses runtime counter relocation, and pulling in profile runtime for unused functions causes a linker error: undefined hidden symbol: __llvm_profile_counter_bias. Since https://reviews.llvm.org/D98061, we do not hook profile runtime for the binaries that none of its translation units have been instrumented in Fuchsia. This patch extends that for the instrumented binaries that consist of only unused functions. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D122336 |
||
---|---|---|
.. | ||
Inputs | ||
abspath.cpp | ||
block-storage-starts-region.m | ||
branch-constfolded.cpp | ||
branch-logical-mixed.cpp | ||
branch-macros.cpp | ||
branch-mincounters.cpp | ||
branch-templates.cpp | ||
break.c | ||
builtinmacro.c | ||
casts.c | ||
classtemplate.cpp | ||
comment-in-macro.c | ||
comment.cpp | ||
continue.c | ||
control-flow-macro.c | ||
coroutine.cpp | ||
decl.c | ||
default-method.cpp | ||
empty-destructor.cpp | ||
header.cpp | ||
if.cpp | ||
implicit-def-in-macro.m | ||
include-macros.c | ||
includehell.cpp | ||
ir.c | ||
label.cpp | ||
lambda.cpp | ||
logical.cpp | ||
loopmacro.c | ||
loops.cpp | ||
macro-expansion.c | ||
macro-expressions.cpp | ||
macro-stringize-twice.cpp | ||
macroception.c | ||
macroparams.c | ||
macroparams2.c | ||
macros.c | ||
macroscopes.cpp | ||
md.cpp | ||
moremacros.c | ||
nestedclass.cpp | ||
objc.m | ||
openmp.c | ||
pr32679.cpp | ||
preprocessor.c | ||
return.c | ||
switch.cpp | ||
switchmacro.c | ||
system_macro.cpp | ||
templates.cpp | ||
terminate-statements.cpp | ||
test.c | ||
trycatch.cpp | ||
trymacro.cpp | ||
unreachable-macro.c | ||
unused_function.cpp | ||
unused_function_no_runtime_hook.cpp | ||
unused_names.c | ||
while.c |