diff options
author | Augie Fackler <augie@google.com> | 2022-03-29 11:14:07 -0400 |
---|---|---|
committer | Augie Fackler <augie@google.com> | 2022-05-31 10:01:17 -0400 |
commit | 42861faa8e17058f0b4a027bba13ef59a600e051 (patch) | |
tree | fcb7d24e0edcc6469b161bf6991e466575291fb3 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | b9443cb6fa6ba0be030cb0ed5f556d69c7f7de56 (diff) | |
download | llvm-42861faa8e17058f0b4a027bba13ef59a600e051.zip llvm-42861faa8e17058f0b4a027bba13ef59a600e051.tar.gz llvm-42861faa8e17058f0b4a027bba13ef59a600e051.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index b4cafd4..66445c8 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -650,6 +650,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) { return bitc::ATTR_KIND_MIN_SIZE; case Attribute::AllocatedPointer: return bitc::ATTR_KIND_ALLOCATED_POINTER; + case Attribute::AllocKind: + return bitc::ATTR_KIND_ALLOC_KIND; case Attribute::Naked: return bitc::ATTR_KIND_NAKED; case Attribute::Nest: |