about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2015-03-13 03:19:30 +0100
committerBjörn Steinbrink <bsteinbr@gmail.com>2015-03-13 03:19:30 +0100
commit0942803f502d164883294e29238e3ac4822867ed (patch)
treedb8ccf90663de0ca953c24f896abe519148f7754 /src/rustllvm/RustWrapper.cpp
parent49f7550a25722fbdb779eef80afa85f6d802f7e8 (diff)
downloadrust-0942803f502d164883294e29238e3ac4822867ed.tar.gz
rust-0942803f502d164883294e29238e3ac4822867ed.zip
Add an "allocator" attribute to mark functions as allocators
When this attribute is applied to a function, its return value gets the
noalias attribute, which is how you tell LLVM that the function returns
a "new" pointer that doesn't alias anything accessible to the caller,
i.e. it acts like a memory allocator.

Plain malloc doesn't need this attribute because LLVM already knows
about malloc and adds the attribute itself.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions