diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2015-03-13 03:19:30 +0100 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2015-03-13 03:19:30 +0100 |
| commit | 0942803f502d164883294e29238e3ac4822867ed (patch) | |
| tree | db8ccf90663de0ca953c24f896abe519148f7754 /src/rustllvm/RustWrapper.cpp | |
| parent | 49f7550a25722fbdb779eef80afa85f6d802f7e8 (diff) | |
| download | rust-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
