diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2013-03-08 20:44:37 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2013-03-13 16:59:37 -0400 |
| commit | efc7f82bc44926c864c52caca8764816ab9150dd (patch) | |
| tree | c2d0cb8d8e8260c58e5b12d51218d935a83462d9 /src/rustllvm/RustWrapper.cpp | |
| parent | 4d8ddff52a60d3785052f1e0a231cb95c98fdc24 (diff) | |
| download | rust-efc7f82bc44926c864c52caca8764816ab9150dd.tar.gz rust-efc7f82bc44926c864c52caca8764816ab9150dd.zip | |
Revamp foreign code not to consider the Rust modes. This requires
adjusting a few foreign functions that were declared with by-ref mode. This also allows us to remove by-val mode in the near future. With copy mode, though, we have to be careful because Rust will implicitly pass somethings by pointer but this may not be the C ABI rules. For example, rust will pass a struct Foo as a Foo*. So I added some code into the adapters to fix this (though the C ABI rules may put the pointer back, oh well). This patch also includes a lint mode for the use of by-ref mode in foreign functions as the semantics of this have changed.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 7686dcd4ff4..12b305720cc 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -546,8 +546,8 @@ extern "C" LLVMValueRef LLVMInlineAsm(LLVMTypeRef Ty, char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack, - InlineAsm::AsmDialect Dialect) { + unsigned Dialect) { return wrap(InlineAsm::get(unwrap<FunctionType>(Ty), AsmString, Constraints, HasSideEffects, - IsAlignStack, Dialect)); + IsAlignStack, (InlineAsm::AsmDialect) Dialect)); } |
