summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorBrian Homerding <homerdin@gmail.com>2019-07-08 15:57:56 +0000
committerBrian Homerding <homerdin@gmail.com>2019-07-08 15:57:56 +0000
commitb4b21d807e4f47f1f87b05fddf6bb3167b14476e (patch)
tree2ca1fdfcf72d73e5d6245cbd845c3f372e0a9dc9 /llvm/lib/Bitcode/Writer
parentb52a0c0cc88f0d66ae8ea770f92ed3448aee88a7 (diff)
downloadbcm5719-llvm-b4b21d807e4f47f1f87b05fddf6bb3167b14476e.tar.gz
bcm5719-llvm-b4b21d807e4f47f1f87b05fddf6bb3167b14476e.zip
Add, and infer, a nofree function attribute
This patch adds a function attribute, nofree, to indicate that a function does not, directly or indirectly, call a memory-deallocation function (e.g., free, C++'s operator delete). Reviewers: jdoerfert Differential Revision: https://reviews.llvm.org/D49165 llvm-svn: 365336
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 547889f82c7..65b9e0bb6a1 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -639,6 +639,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
return bitc::ATTR_KIND_NO_CAPTURE;
case Attribute::NoDuplicate:
return bitc::ATTR_KIND_NO_DUPLICATE;
+ case Attribute::NoFree:
+ return bitc::ATTR_KIND_NOFREE;
case Attribute::NoImplicitFloat:
return bitc::ATTR_KIND_NO_IMPLICIT_FLOAT;
case Attribute::NoInline:
OpenPOWER on IntegriCloud