diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-10-10 20:54:50 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-11-19 02:43:55 +0200 |
| commit | 18ecc564f2cee4da3ef9397ba58e19d3fd9be3de (patch) | |
| tree | dd9970b4cfa69a7c7d52bf428280d0c196eb4f98 /src/librustc_llvm | |
| parent | 7a36141465d1f97936cfceca87ed428dbfafdd3f (diff) | |
| download | rust-18ecc564f2cee4da3ef9397ba58e19d3fd9be3de.tar.gz rust-18ecc564f2cee4da3ef9397ba58e19d3fd9be3de.zip | |
rustc_trans: support scalar pairs directly in the Rust ABI.
Diffstat (limited to 'src/librustc_llvm')
| -rw-r--r-- | src/librustc_llvm/lib.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 5ccce8de706..592bd620564 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -74,22 +74,19 @@ pub fn AddFunctionAttrStringValue(llfn: ValueRef, } } -#[repr(C)] #[derive(Copy, Clone)] pub enum AttributePlace { + ReturnValue, Argument(u32), Function, } impl AttributePlace { - pub fn ReturnValue() -> Self { - AttributePlace::Argument(0) - } - pub fn as_uint(self) -> c_uint { match self { + AttributePlace::ReturnValue => 0, + AttributePlace::Argument(i) => 1 + i, AttributePlace::Function => !0, - AttributePlace::Argument(i) => i, } } } |
