about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2014-06-18 13:01:23 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2014-06-21 19:59:57 +0200
commitabdbaa2e19dcf6859ae781bb9b44fed483181229 (patch)
tree876ec021b8cd312ce274e5032e8f6c1380c487f2 /src/rustllvm/RustWrapper.cpp
parentf556c8cbd8af182a9dd871a4a36692a0dba7cc2e (diff)
downloadrust-abdbaa2e19dcf6859ae781bb9b44fed483181229.tar.gz
rust-abdbaa2e19dcf6859ae781bb9b44fed483181229.zip
Correctly set return type attributes on foreign function declarations
The ArgType type gives us a generic way to specify an attribute for a
type to ensure ABI conformance for foreign functions. But the code that
actually sets the argument attributes in the function declaration
only sets the attribute for the return type when the type is indirect.

Since LLVMAddAttribute() doesn't allow to set attributes on the return
type, we have to use LLVMAddFunctionAttribute() instead.

This didn't cause problems yet, because currently only some indirect
types require attributes to be set.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions