diff options
author | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2022-07-13 08:39:26 -0700 |
---|---|---|
committer | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2022-07-13 08:54:41 -0700 |
commit | 90e5a8ac475fa3c2fa7c22a341e798d6f7356b54 (patch) | |
tree | a0b13d99de440f2e29b9981def322f6948fabdd6 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 4f281fa2a86b1806ec3143373795d8eac559e37f (diff) | |
download | llvm-90e5a8ac475fa3c2fa7c22a341e798d6f7356b54.zip llvm-90e5a8ac475fa3c2fa7c22a341e798d6f7356b54.tar.gz llvm-90e5a8ac475fa3c2fa7c22a341e798d6f7356b54.tar.bz2 |
Remove 'no_sanitize_memtag'. Add 'sanitize_memtag'.
For MTE globals, we should have clang emit the attribute for all GV's
that it creates, and then use that in the upcoming AArch64 global
tagging IR pass. We need a positive attribute for this sanitizer (rather
than implicit sanitization of all globals) because it needs to interact
with other parts of LLVM, including:
1. Suppressing certain global optimisations (like merging),
2. Emitting extra directives by the ASM writer, and
3. Putting extra information in the symbol table entries.
While this does technically make the LLVM IR / bitcode format
non-backwards-compatible, nobody should have used this attribute yet,
because it's a no-op.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D128950
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 468c71c..590562c 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1234,7 +1234,7 @@ static_assert(sizeof(GlobalValue::SanitizerMetadata) <= sizeof(unsigned), static unsigned serializeSanitizerMetadata(const GlobalValue::SanitizerMetadata &Meta) { return Meta.NoAddress | (Meta.NoHWAddress << 1) | - (Meta.NoMemtag << 2) | (Meta.IsDynInit << 3); + (Meta.Memtag << 2) | (Meta.IsDynInit << 3); } /// Emit top-level description of module, including target triple, inline asm, |