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 | d52b1528c0dd7a5f00e18d9ba974c8ef0e549f0b (patch) | |
tree | c00b5abebd9a613232f62650ef6c5cfd5a857e96 /llvm/lib/Bitcode/Writer | |
parent | 57cccec4467282be31fb1c8b47bd1a71629ff732 (diff) | |
download | bcm5719-llvm-d52b1528c0dd7a5f00e18d9ba974c8ef0e549f0b.tar.gz bcm5719-llvm-d52b1528c0dd7a5f00e18d9ba974c8ef0e549f0b.zip |
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!
llvm-svn: 209185
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-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 23374872df1..db254e6a941 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -197,6 +197,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) { return bitc::ATTR_KIND_NO_INLINE; case Attribute::NonLazyBind: return bitc::ATTR_KIND_NON_LAZY_BIND; + case Attribute::NonNull: + return bitc::ATTR_KIND_NON_NULL; case Attribute::NoRedZone: return bitc::ATTR_KIND_NO_RED_ZONE; case Attribute::NoReturn: |