From 18ecc564f2cee4da3ef9397ba58e19d3fd9be3de Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 10 Oct 2017 20:54:50 +0300 Subject: rustc_trans: support scalar pairs directly in the Rust ABI. --- src/librustc_llvm/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/librustc_llvm') 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, } } } -- cgit 1.4.1-3-g733a5