Skip to content

Commit adb4a0e

Browse files
committed
Rename Sanitizer Coverage => Coverage Sanitizer
This is so that we are consistent with other sanitizers. Importantly, this makes the docs clearer. Driver flags are left unchanged. The good thing is that flags were already consistent with other sanitizers so there would not be any motivation to change them, even if we were feeling disruptive.
1 parent ec9f36a commit adb4a0e

File tree

79 files changed

+186
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+186
-186
lines changed

clang/docs/SanitizerCoverage.rst renamed to clang/docs/CoverageSanitizer.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=================
2-
SanitizerCoverage
2+
CoverageSanitizer
33
=================
44

55
.. contents::
@@ -8,7 +8,7 @@ SanitizerCoverage
88
Introduction
99
============
1010

11-
LLVM has a simple code coverage instrumentation built in (SanitizerCoverage).
11+
LLVM has a simple code coverage instrumentation built in (CoverageSanitizer).
1212
It inserts calls to user-defined functions on function-, basic-block-, and edge- levels.
1313
Default implementations of those callbacks are provided and implement
1414
simple coverage reporting and visualization,
@@ -208,7 +208,7 @@ This mechanism is used for fuzzing the Linux kernel
208208

209209
Instrumentation points
210210
======================
211-
Sanitizer Coverage offers different levels of instrumentation.
211+
Coverage Sanitizer offers different levels of instrumentation.
212212

213213
* ``edge`` (default): edges are instrumented (see below).
214214
* ``bb``: basic blocks are instrumented.
@@ -397,13 +397,13 @@ together with ``__has_feature(coverage_sanitizer)``.
397397
Disabling instrumentation without source modification
398398
=====================================================
399399

400-
It is sometimes useful to tell SanitizerCoverage to instrument only a subset of the
400+
It is sometimes useful to tell CoverageSanitizer to instrument only a subset of the
401401
functions in your target without modifying source files.
402402
With ``-fsanitize-coverage-allowlist=allowlist.txt``
403403
and ``-fsanitize-coverage-ignorelist=blocklist.txt``,
404404
you can specify such a subset through the combination of an allowlist and a blocklist.
405405

406-
SanitizerCoverage will only instrument functions that satisfy two conditions.
406+
CoverageSanitizer will only instrument functions that satisfy two conditions.
407407
First, the function should belong to a source file with a path that is both allowlisted
408408
and not blocklisted.
409409
Second, the function should have a mangled name that is both allowlisted and not blocklisted.
@@ -471,16 +471,16 @@ Example:
471471
% clang++ -g cov.cc -fsanitize=address -fsanitize-coverage=trace-pc-guard
472472
% ASAN_OPTIONS=coverage=1 ./a.out; wc -c *.sancov
473473
main
474-
SanitizerCoverage: ./a.out.7312.sancov 2 PCs written
474+
CoverageSanitizer: ./a.out.7312.sancov 2 PCs written
475475
24 a.out.7312.sancov
476476
% ASAN_OPTIONS=coverage=1 ./a.out foo ; wc -c *.sancov
477477
foo
478478
main
479-
SanitizerCoverage: ./a.out.7316.sancov 3 PCs written
479+
CoverageSanitizer: ./a.out.7316.sancov 3 PCs written
480480
24 a.out.7312.sancov
481481
32 a.out.7316.sancov
482482
483-
Every time you run an executable instrumented with SanitizerCoverage
483+
Every time you run an executable instrumented with CoverageSanitizer
484484
one ``*.sancov`` file is created during the process shutdown.
485485
If the executable is dynamically linked against instrumented DSOs,
486486
one ``*.sancov`` file will be also created for every DSO.

clang/docs/SourceBasedCodeCoverage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ information directly. This allows it to generate very precise coverage data.
1414

1515
Clang ships two other code coverage implementations:
1616

17-
* :doc:`SanitizerCoverage` - A low-overhead tool meant for use alongside the
17+
* :doc:`CoverageSanitizer` - A low-overhead tool meant for use alongside the
1818
various sanitizers. It can provide up to edge-level coverage.
1919

2020
* gcov - A GCC-compatible coverage implementation which operates on DebugInfo.

clang/docs/UsersManual.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,7 @@ are listed below.
21402140
.. option:: -f[no-]sanitize-coverage=[type,features,...]
21412141

21422142
Enable simple code coverage in addition to certain sanitizers.
2143-
See :doc:`SanitizerCoverage` for more details.
2143+
See :doc:`CoverageSanitizer` for more details.
21442144

21452145
.. option:: -f[no-]sanitize-address-outline-instrumentation
21462146

clang/docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Using Clang as a Compiler
3333
DataFlowSanitizer
3434
LeakSanitizer
3535
RealtimeSanitizer
36-
SanitizerCoverage
36+
CoverageSanitizer
3737
SanitizerStats
3838
SanitizerSpecialCaseList
3939
BoundsSafety

clang/docs/tools/clang-formatted-files.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5560,7 +5560,7 @@ llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
55605560
llvm/include/llvm/Transforms/Instrumentation/InstrOrderFile.h
55615561
llvm/include/llvm/Transforms/Instrumentation/InstrProfiling.h
55625562
llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
5563-
llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
5563+
llvm/include/llvm/Transforms/Instrumentation/CoverageSanitizer.h
55645564
llvm/include/llvm/Transforms/IPO/Annotation2Metadata.h
55655565
llvm/include/llvm/Transforms/IPO/ArgumentPromotion.h
55665566
llvm/include/llvm/Transforms/IPO/Attributor.h

clang/include/clang/Basic/AttrDocs.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3142,12 +3142,12 @@ instrumentations should not be applied.
31423142
The attribute takes a list of string literals with the following accepted
31433143
values:
31443144
* all values accepted by ``-fno-sanitize=``;
3145-
* ``coverage``, to disable SanitizerCoverage instrumentation.
3145+
* ``coverage``, to disable CoverageSanitizer instrumentation.
31463146

31473147
For example, ``__attribute__((no_sanitize("address", "thread")))`` specifies
31483148
that AddressSanitizer and ThreadSanitizer should not be applied to the function
31493149
or variable. Using ``__attribute__((no_sanitize("coverage")))`` specifies that
3150-
SanitizerCoverage should not be applied to the function.
3150+
CoverageSanitizer should not be applied to the function.
31513151

31523152
See :ref:`Controlling Code Generation <controlling-code-generation>` for a
31533153
full list of supported sanitizer flags.

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,24 +271,24 @@ CODEGENOPT(SanitizeCfiICallNormalizeIntegers, 1, 0) ///< Normalize integer types
271271
///< CFI icall function signatures
272272
CODEGENOPT(SanitizeCfiCanonicalJumpTables, 1, 0) ///< Make jump table symbols canonical
273273
///< instead of creating a local jump table.
274-
CODEGENOPT(SanitizeCoverageType, 2, 0) ///< Type of sanitizer coverage
274+
CODEGENOPT(SanitizeCoverageType, 2, 0) ///< Type of coverage sanitizer
275275
///< instrumentation.
276-
CODEGENOPT(SanitizeCoverageIndirectCalls, 1, 0) ///< Enable sanitizer coverage
276+
CODEGENOPT(SanitizeCoverageIndirectCalls, 1, 0) ///< Enable coverage sanitizer
277277
///< for indirect calls.
278278
CODEGENOPT(SanitizeCoverageTraceBB, 1, 0) ///< Enable basic block tracing in
279-
///< in sanitizer coverage.
279+
///< in coverage sanitizer.
280280
CODEGENOPT(SanitizeCoverageTraceCmp, 1, 0) ///< Enable cmp instruction tracing
281-
///< in sanitizer coverage.
281+
///< in coverage sanitizer.
282282
CODEGENOPT(SanitizeCoverageTraceDiv, 1, 0) ///< Enable div instruction tracing
283-
///< in sanitizer coverage.
283+
///< in coverage sanitizer.
284284
CODEGENOPT(SanitizeCoverageTraceGep, 1, 0) ///< Enable GEP instruction tracing
285-
///< in sanitizer coverage.
285+
///< in coverage sanitizer.
286286
CODEGENOPT(SanitizeCoverage8bitCounters, 1, 0) ///< Use 8-bit frequency counters
287-
///< in sanitizer coverage.
287+
///< in coverage sanitizer.
288288
CODEGENOPT(SanitizeCoverageTracePC, 1, 0) ///< Enable PC tracing
289-
///< in sanitizer coverage.
289+
///< in coverage sanitizer.
290290
CODEGENOPT(SanitizeCoverageTracePCGuard, 1, 0) ///< Enable PC tracing with guard
291-
///< in sanitizer coverage.
291+
///< in coverage sanitizer.
292292
CODEGENOPT(SanitizeCoverageInline8bitCounters, 1, 0) ///< Use inline 8bit counters.
293293
CODEGENOPT(SanitizeCoverageInlineBoolFlag, 1, 0) ///< Use inline bool flag.
294294
CODEGENOPT(SanitizeCoveragePCTable, 1, 0) ///< Create a PC Table.

clang/include/clang/Basic/CodeGenOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ class CodeGenOptions : public CodeGenOptionsBase {
419419

420420
/// Path to allowlist file specifying which objects
421421
/// (files, functions) should exclusively be instrumented
422-
/// by sanitizer coverage pass.
422+
/// by coverage sanitizer pass.
423423
std::vector<std::string> SanitizeCoverageAllowlistFiles;
424424

425425
/// The guard style used for stack protector to get a initial value, this

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ def err_drv_missing_sanitizer_ignorelist : Error<
247247
"missing sanitizer ignorelist: '%0'">;
248248
def err_drv_malformed_sanitizer_ignorelist : Error<
249249
"malformed sanitizer ignorelist: '%0'">;
250-
def err_drv_malformed_sanitizer_coverage_allowlist : Error<
251-
"malformed sanitizer coverage allowlist: '%0'">;
252-
def err_drv_malformed_sanitizer_coverage_ignorelist : Error<
253-
"malformed sanitizer coverage ignorelist: '%0'">;
250+
def err_drv_malformed_coverage_sanitizer_allowlist : Error<
251+
"malformed coverage sanitizer allowlist: '%0'">;
252+
def err_drv_malformed_coverage_sanitizer_ignorelist : Error<
253+
"malformed coverage sanitizer ignorelist: '%0'">;
254254
def err_drv_malformed_sanitizer_metadata_ignorelist : Error<
255255
"malformed sanitizer metadata ignorelist: '%0'">;
256256
def err_drv_unsupported_static_sanitizer_darwin : Error<

clang/include/clang/Driver/Options.td

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,11 +2366,11 @@ def fno_sanitize_coverage : CommaJoined<["-"], "fno-sanitize-coverage=">,
23662366
"inline-bool-flag">;
23672367
def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">,
23682368
Group<f_clang_Group>, Visibility<[ClangOption, CLOption]>,
2369-
HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">,
2369+
HelpText<"Restrict coverage sanitizer instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">,
23702370
MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageAllowlistFiles">>;
23712371
def fsanitize_coverage_ignorelist : Joined<["-"], "fsanitize-coverage-ignorelist=">,
23722372
Group<f_clang_Group>, Visibility<[ClangOption, CLOption]>,
2373-
HelpText<"Disable sanitizer coverage instrumentation for modules and functions "
2373+
HelpText<"Disable coverage sanitizer instrumentation for modules and functions "
23742374
"that match the provided special case list, even the allowed ones">,
23752375
MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageIgnorelistFiles">>;
23762376
def fexperimental_sanitize_metadata_EQ : CommaJoined<["-"], "fexperimental-sanitize-metadata=">,
@@ -7311,39 +7311,39 @@ def linker_option : Joined<["--"], "linker-option=">,
73117311
HelpText<"Add linker option">,
73127312
MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>;
73137313
def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
7314-
HelpText<"Sanitizer coverage type">,
7314+
HelpText<"Coverage sanitizer type">,
73157315
MarshallingInfoInt<CodeGenOpts<"SanitizeCoverageType">>;
73167316
def fsanitize_coverage_indirect_calls
73177317
: Flag<["-"], "fsanitize-coverage-indirect-calls">,
7318-
HelpText<"Enable sanitizer coverage for indirect calls">,
7318+
HelpText<"Enable coverage sanitizer for indirect calls">,
73197319
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageIndirectCalls">>;
73207320
def fsanitize_coverage_trace_bb
73217321
: Flag<["-"], "fsanitize-coverage-trace-bb">,
7322-
HelpText<"Enable basic block tracing in sanitizer coverage">,
7322+
HelpText<"Enable basic block tracing in coverage sanitizer">,
73237323
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceBB">>;
73247324
def fsanitize_coverage_trace_cmp
73257325
: Flag<["-"], "fsanitize-coverage-trace-cmp">,
7326-
HelpText<"Enable cmp instruction tracing in sanitizer coverage">,
7326+
HelpText<"Enable cmp instruction tracing in coverage sanitizer">,
73277327
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceCmp">>;
73287328
def fsanitize_coverage_trace_div
73297329
: Flag<["-"], "fsanitize-coverage-trace-div">,
7330-
HelpText<"Enable div instruction tracing in sanitizer coverage">,
7330+
HelpText<"Enable div instruction tracing in coverage sanitizer">,
73317331
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceDiv">>;
73327332
def fsanitize_coverage_trace_gep
73337333
: Flag<["-"], "fsanitize-coverage-trace-gep">,
7334-
HelpText<"Enable gep instruction tracing in sanitizer coverage">,
7334+
HelpText<"Enable gep instruction tracing in coverage sanitizer">,
73357335
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceGep">>;
73367336
def fsanitize_coverage_8bit_counters
73377337
: Flag<["-"], "fsanitize-coverage-8bit-counters">,
7338-
HelpText<"Enable frequency counters in sanitizer coverage">,
7338+
HelpText<"Enable frequency counters in coverage sanitizer">,
73397339
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverage8bitCounters">>;
73407340
def fsanitize_coverage_inline_8bit_counters
73417341
: Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
7342-
HelpText<"Enable inline 8-bit counters in sanitizer coverage">,
7342+
HelpText<"Enable inline 8-bit counters in coverage sanitizer">,
73437343
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInline8bitCounters">>;
73447344
def fsanitize_coverage_inline_bool_flag
73457345
: Flag<["-"], "fsanitize-coverage-inline-bool-flag">,
7346-
HelpText<"Enable inline bool flag in sanitizer coverage">,
7346+
HelpText<"Enable inline bool flag in coverage sanitizer">,
73477347
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInlineBoolFlag">>;
73487348
def fsanitize_coverage_pc_table
73497349
: Flag<["-"], "fsanitize-coverage-pc-table">,
@@ -7355,11 +7355,11 @@ def fsanitize_coverage_control_flow
73557355
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageControlFlow">>;
73567356
def fsanitize_coverage_trace_pc
73577357
: Flag<["-"], "fsanitize-coverage-trace-pc">,
7358-
HelpText<"Enable PC tracing in sanitizer coverage">,
7358+
HelpText<"Enable PC tracing in coverage sanitizer">,
73597359
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePC">>;
73607360
def fsanitize_coverage_trace_pc_guard
73617361
: Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
7362-
HelpText<"Enable PC tracing with guard in sanitizer coverage">,
7362+
HelpText<"Enable PC tracing with guard in coverage sanitizer">,
73637363
MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePCGuard">>;
73647364
def fsanitize_coverage_no_prune
73657365
: Flag<["-"], "fsanitize-coverage-no-prune">,

0 commit comments

Comments
 (0)