llvm-project/llvm
Vedant Kumar 9a041a7522 [InstrProfiling] Emit the runtime hook when no counters are lowered
The API verification tool tapi has difficulty processing frameworks
which enable code coverage, but which have no code. The profile lowering
pass does not emit the runtime hook in this case because no counters are
lowered.

While the hook is not needed for program correctness (the profile
runtime doesn't have to be linked in), it's needed to allow tapi to
validate the exported symbol set of instrumented binaries.

It was not possible to add a workaround in tapi for empty binaries due
to an architectural issue: tapi generates its expected symbol set before
it inspects a binary. Changing that model has a higher cost than simply
forcing llvm to always emit the runtime hook.

rdar://36076904

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

llvm-svn: 326350
2018-02-28 19:00:08 +00:00
..
bindings Because of CVE-2018-6574, some compiler options and linker options are restricted to prevent arbitrary code execution. 2018-02-23 20:12:24 +00:00
cmake Don't make PDBs by default in Release mode 2018-02-15 21:25:23 +00:00
docs [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
examples [ORC] Consolidate RTDyldObjectLinkingLayer GetMemMgr and GetResolver into a 2018-02-14 22:13:02 +00:00
include [InstrProfiling] Emit the runtime hook when no counters are lowered 2018-02-28 19:00:08 +00:00
lib [InstrProfiling] Emit the runtime hook when no counters are lowered 2018-02-28 19:00:08 +00:00
projects
resources
runtimes
test [InstrProfiling] Emit the runtime hook when no counters are lowered 2018-02-28 19:00:08 +00:00
tools [WebAssembly] Remove DataSize from linking metadata section 2018-02-27 23:57:37 +00:00
unittests [Dominators] Remove verifyDomTree and add some verifying for Post Dom Trees 2018-02-28 11:00:08 +00:00
utils update_mir_test_checks: Use the regexes from UpdateTestChecks.common 2018-02-28 00:56:24 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt CMake: Allow specifying arbitrary CCACHE parameters 2018-02-09 23:25:23 +00:00
CODE_OWNERS.TXT
CREDITS.TXT Add myself to CREDITS.txt 2018-01-29 17:02:34 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.