diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2014-05-20 01:23:40 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2014-05-20 01:23:40 +0000 |
commit | fe47ebfad39184dfca0733c5ef943a074bfcc187 (patch) | |
tree | 2f60176fb1f04022ea8a167ff280bc824f18f11a /docs | |
parent | 30e58303015fe880180e3caffdd8a3264cde236a (diff) | |
download | llvm-fe47ebfad39184dfca0733c5ef943a074bfcc187.tar.gz llvm-fe47ebfad39184dfca0733c5ef943a074bfcc187.tar.bz2 llvm-fe47ebfad39184dfca0733c5ef943a074bfcc187.tar.xz |
Add 'nonnull', a new parameter and return attribute which indicates that the pointer is not null. Instcombine will elide comparisons between these and null. Patch by Luqman Aden!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/LangRef.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst index d2f9a1d4f1..ceec1bd547 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -847,6 +847,13 @@ Currently, only the following parameter attributes are defined: operands for the :ref:`bitcast instruction <i_bitcast>`. This is not a valid attribute for return values and can only be applied to one parameter. +``nonnull`` + This indicates that the parameter or return pointer is not null. This + attribute may only be applied to pointer typed parameters. This is not + checked or enforced by LLVM, the caller must ensure that the pointer + passed in is non-null, or the callee must ensure that the returned pointer + is non-null. + .. _gc: Garbage Collector Names |