llvm-project/clang/test/CoverageMapping
Gulfem Savrun Yeniceri d6aed77f0d [InstrProfiling] No runtime hook for unused funcs
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
2022-09-16 02:05:09 +00:00
..
Inputs
abspath.cpp Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
block-storage-starts-region.m Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
branch-constfolded.cpp
branch-logical-mixed.cpp
branch-macros.cpp
branch-mincounters.cpp
branch-templates.cpp
break.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
builtinmacro.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
casts.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
classtemplate.cpp
comment-in-macro.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
comment.cpp
continue.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
control-flow-macro.c
coroutine.cpp [clang][NFC] Cleanup some coroutine tests 2022-05-16 05:15:12 -07:00
decl.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
default-method.cpp
empty-destructor.cpp
header.cpp
if.cpp [Clang] Fix crash in coverage of if consteval. 2022-08-26 17:46:53 +02:00
implicit-def-in-macro.m Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
include-macros.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
includehell.cpp
ir.c [Test] Use cc1 instead of mllvm -opaque-pointers option (NFC) 2022-04-05 12:04:48 +02:00
label.cpp
lambda.cpp
logical.cpp
loopmacro.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
loops.cpp
macro-expansion.c
macro-expressions.cpp
macro-stringize-twice.cpp
macroception.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
macroparams.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
macroparams2.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
macros.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
macroscopes.cpp
md.cpp
moremacros.c
nestedclass.cpp
objc.m
openmp.c
pr32679.cpp
preprocessor.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
return.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
switch.cpp
switchmacro.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
system_macro.cpp
templates.cpp
terminate-statements.cpp
test.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
trycatch.cpp
trymacro.cpp
unreachable-macro.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
unused_function.cpp
unused_function_no_runtime_hook.cpp [InstrProfiling] No runtime hook for unused funcs 2022-09-16 02:05:09 +00:00
unused_names.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00
while.c Use functions with prototypes when appropriate; NFC 2022-02-09 09:11:49 -05:00