diff options
| author | bors <bors@rust-lang.org> | 2017-04-09 13:08:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-04-09 13:08:10 +0000 |
| commit | 2c48ae6f7ffae392d85c86240c67f49df01f44fd (patch) | |
| tree | c06e0af7f5529ddbc0de7bdd9f8908949d190724 /src/test/codegen/function-arguments.rs | |
| parent | ebb10a6131834e14f0685ef399b531444d631e9c (diff) | |
| parent | f0636b61c7f84962a609e831760db9d77f4f5e14 (diff) | |
| download | rust-2c48ae6f7ffae392d85c86240c67f49df01f44fd.tar.gz rust-2c48ae6f7ffae392d85c86240c67f49df01f44fd.zip | |
Auto merge of #40658 - eddyb:lay-more-out, r=arielb1
Use ty::layout for ABI computation instead of LLVM types. This is the first step in creating a backend-agnostic library for computing call ABI details from signatures. I wanted to open the PR *before* attempting to move `cabi_*` from trans to avoid rebase churn in #39999. **EDIT**: As I suspected, #39999 needs this PR to fully work (see https://github.com/rust-lang/rust/pull/39999#issuecomment-287723379). The first 3 commits add more APIs to `ty::layout` and replace non-ABI uses of `sizing_type_of`. These APIs are probably usable by other backends, and miri too (cc @stoklund @solson). The last commit rewrites `rustc_trans::cabi_*` to use `ty::layout` and new `rustc_trans::abi` APIs. Also, during the process, a couple trivial bugs were identified and fixed: * `msp430`, `nvptx`, `nvptx64`: type sizes *in bytes* were compared with `32` and `64` * `x86` (`fastcall`): `f64` was incorrectly not treated the same way as `f32` Although not urgent, this PR also uses the more general "homogenous aggregate" logic to fix #32045.
Diffstat (limited to 'src/test/codegen/function-arguments.rs')
| -rw-r--r-- | src/test/codegen/function-arguments.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/codegen/function-arguments.rs b/src/test/codegen/function-arguments.rs index 76313b158ab..bc84ac49da9 100644 --- a/src/test/codegen/function-arguments.rs +++ b/src/test/codegen/function-arguments.rs @@ -121,13 +121,13 @@ pub fn unsafe_slice(_: &[UnsafeInner]) { fn str(_: &[u8]) { } -// CHECK: @trait_borrow(i8* nonnull, void (i8*)** noalias nonnull readonly) +// CHECK: @trait_borrow({}* nonnull, {}* noalias nonnull readonly) // FIXME #25759 This should also have `nocapture` #[no_mangle] fn trait_borrow(_: &Drop) { } -// CHECK: @trait_box(i8* noalias nonnull, void (i8*)** noalias nonnull readonly) +// CHECK: @trait_box({}* noalias nonnull, {}* noalias nonnull readonly) #[no_mangle] fn trait_box(_: Box<Drop>) { } |
