summary refs log tree commit diff
path: root/src/librustc_llvm
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-10-10 20:54:50 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-11-19 02:43:55 +0200
commit18ecc564f2cee4da3ef9397ba58e19d3fd9be3de (patch)
treedd9970b4cfa69a7c7d52bf428280d0c196eb4f98 /src/librustc_llvm
parent7a36141465d1f97936cfceca87ed428dbfafdd3f (diff)
downloadrust-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.rs9
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,
         }
     }
 }