[SanitizerBinaryMetadata] Support ignore list
authorMarco Elver <elver@google.com>
Fri, 10 Feb 2023 08:34:08 +0000 (09:34 +0100)
committerMarco Elver <elver@google.com>
Fri, 10 Feb 2023 09:25:48 +0000 (10:25 +0100)
commit421215b919d037a912cd4fffa73242852da41fc0
tree39ae1cddee7d8aa9c545de2e99ec4e6c9493675d
parentc340956e4efce204c885ab7aad94b74d9255f3a9
[SanitizerBinaryMetadata] Support ignore list

For large projects it will be required to opt out entire subdirectories.
In the absence of fine-grained control over the flags passed via the
build system, introduce -fexperimental-sanitize-metadata-ignorelist=.

The format is identical to other sanitizer ignore lists, and its effect
will be to simply not instrument either functions or entire modules
based on the rules in the ignore list file.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D143664
clang/include/clang/Basic/CodeGenOptions.h
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/include/clang/Driver/SanitizerArgs.h
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/SanitizerArgs.cpp
clang/test/CodeGen/sanitize-metadata-ignorelist.c [new file with mode: 0644]
clang/test/Driver/fsanitize-metadata-ignorelist.c [new file with mode: 0644]
llvm/include/llvm/Transforms/Instrumentation/SanitizerBinaryMetadata.h
llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp