diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-04-12 01:05:35 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-04-12 01:05:35 +0000 |
commit | 278199f615d9f9e224e5033b9558c6ed974cbf37 (patch) | |
tree | ed03369bae73053077296d212482ab279c4ee013 /llvm/test/Verifier/alloc-size-failedparse.ll | |
parent | b40d14f3d56e9b0f1bc41f6123586d09ccd6d305 (diff) | |
download | bcm5719-llvm-278199f615d9f9e224e5033b9558c6ed974cbf37.tar.gz bcm5719-llvm-278199f615d9f9e224e5033b9558c6ed974cbf37.zip |
Add the allocsize attribute to LLVM.
`allocsize` is a function attribute that allows users to request that
LLVM treat arbitrary functions as allocation functions.
This patch makes LLVM accept the `allocsize` attribute, and makes
`@llvm.objectsize` recognize said attribute.
The review for this was split into two patches for ease of reviewing:
D18974 and D14933. As promised on the revisions, I'm landing both
patches as a single commit.
Differential Revision: http://reviews.llvm.org/D14933
llvm-svn: 266032
Diffstat (limited to 'llvm/test/Verifier/alloc-size-failedparse.ll')
-rw-r--r-- | llvm/test/Verifier/alloc-size-failedparse.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Verifier/alloc-size-failedparse.ll b/llvm/test/Verifier/alloc-size-failedparse.ll new file mode 100644 index 00000000000..bda64cd796d --- /dev/null +++ b/llvm/test/Verifier/alloc-size-failedparse.ll @@ -0,0 +1,7 @@ +; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s +; +; We handle allocsize with identical args in the parser, rather than the +; verifier. So, a seperate test is needed. + +; CHECK: 'allocsize' indices can't refer to the same parameter +declare i8* @a(i32, i32) allocsize(0, 0) |