Add sanitizer-specific GlobalValue attributes.
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Fri, 10 Jun 2022 19:24:36 +0000 (12:24 -0700)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Fri, 10 Jun 2022 19:28:18 +0000 (12:28 -0700)
commit8db981d463ee266919907f2554194d05f96f7191
tree6459225d9ce90dcad0e74fa605ee240d53ec6f4f
parent0bb317b7bff3d4f70bddd03a1f337c3f2a118943
Add sanitizer-specific GlobalValue attributes.

Plan is the migrate the global variable metadata for sanitizers, that's
currently carried around generally in the 'llvm.asan.globals' section,
onto the global variable itself.

This patch adds the attribute and plumbs it through the LLVM IR and
bitcode formats, but is a no-op other than that so far.

Reviewed By: vitalybuka, kstoimenov

Differential Revision: https://reviews.llvm.org/D126100
12 files changed:
llvm/include/llvm/AsmParser/LLParser.h
llvm/include/llvm/AsmParser/LLToken.h
llvm/include/llvm/IR/GlobalValue.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/Globals.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/test/Assembler/globalvariable-attributes.ll
llvm/test/Bitcode/compatibility.ll