From a907d36cfe8069ce191ffada3b84e37ca50e05b6 Mon Sep 17 00:00:00 2001 From: Augie Fackler Date: Thu, 24 Feb 2022 10:40:20 -0500 Subject: Attributes: add a new `allocptr` attribute This continues the push away from hard-coded knowledge about functions towards attributes. We'll use this to annotate free(), realloc() and cousins and obviate the hard-coded list of free functions. Differential Revision: https://reviews.llvm.org/D123083 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index e773ba8..dcfe12a 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -647,6 +647,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) { return bitc::ATTR_KIND_JUMP_TABLE; case Attribute::MinSize: return bitc::ATTR_KIND_MIN_SIZE; + case Attribute::AllocatedPointer: + return bitc::ATTR_KIND_ALLOCATED_POINTER; case Attribute::Naked: return bitc::ATTR_KIND_NAKED; case Attribute::Nest: -- cgit v1.1