diff options
author | Alexander Potapenko <glider@google.com> | 2021-08-13 14:17:41 +0200 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2021-08-20 14:01:06 +0200 |
commit | b0391dfc737ede147e128fe877045f61fc5e4905 (patch) | |
tree | 092fb66546f815568c2cab1fecd599ff84956470 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | b2aa470faeb7aaedfa63cb192a710fbe086f15c1 (diff) | |
download | llvm-b0391dfc737ede147e128fe877045f61fc5e4905.zip llvm-b0391dfc737ede147e128fe877045f61fc5e4905.tar.gz llvm-b0391dfc737ede147e128fe877045f61fc5e4905.tar.bz2 |
[clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute
The purpose of __attribute__((disable_sanitizer_instrumentation)) is to
prevent all kinds of sanitizer instrumentation applied to a certain
function, Objective-C method, or global variable.
The no_sanitize(...) attribute drops instrumentation checks, but may
still insert code preventing false positive reports. In some cases
though (e.g. when building Linux kernel with -fsanitize=kernel-memory
or -fsanitize=thread) the users may want to avoid any kind of
instrumentation.
Differential Revision: https://reviews.llvm.org/D108029
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index eb6a7f3..49ba562 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1388,6 +1388,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) { return Attribute::Cold; case bitc::ATTR_KIND_CONVERGENT: return Attribute::Convergent; + case bitc::ATTR_KIND_DISABLE_SANITIZER_INSTRUMENTATION: + return Attribute::DisableSanitizerInstrumentation; case bitc::ATTR_KIND_ELEMENTTYPE: return Attribute::ElementType; case bitc::ATTR_KIND_INACCESSIBLEMEM_ONLY: |