mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
4e2d8dca99
`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
8 lines
278 B
LLVM
8 lines
278 B
LLVM
; 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)
|