attributes: introduce allockind attr for describing allocator fn behavior
authorAugie Fackler <augie@google.com>
Tue, 29 Mar 2022 15:14:07 +0000 (11:14 -0400)
committerAugie Fackler <augie@google.com>
Tue, 31 May 2022 14:01:17 +0000 (10:01 -0400)
commit42861faa8e17058f0b4a027bba13ef59a600e051
treefcb7d24e0edcc6469b161bf6991e466575291fb3
parentb9443cb6fa6ba0be030cb0ed5f556d69c7f7de56
attributes: introduce allockind attr for describing allocator fn behavior

I chose to encode the allockind information in a string constant because
otherwise we would get a bit of an explosion of keywords to deal with
the possible permutations of allocation function types.

I'm not sure that CodeGen.h is the correct place for this enum, but it
seemed to kind of match the UWTableKind enum so I put it in the same
place. Constructive suggestions on a better location most certainly
encouraged.

Differential Revision: https://reviews.llvm.org/D123088
16 files changed:
llvm/docs/LangRef.rst
llvm/include/llvm/AsmParser/LLParser.h
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/Attributes.h
llvm/include/llvm/IR/Attributes.td
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/AttributeImpl.h
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Utils/CodeExtractor.cpp
llvm/test/Assembler/allockind-missing.ll [new file with mode: 0644]
llvm/test/Assembler/allockind.ll [new file with mode: 0644]
llvm/test/Bitcode/compatibility.ll
llvm/test/Verifier/allockind.ll [new file with mode: 0644]