Skip to content

Commit 18ecc56

Browse files
committed
rustc_trans: support scalar pairs directly in the Rust ABI.
1 parent 7a36141 commit 18ecc56

File tree

9 files changed

+367
-363
lines changed

9 files changed

+367
-363
lines changed

src/librustc_llvm/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,19 @@ pub fn AddFunctionAttrStringValue(llfn: ValueRef,
7474
}
7575
}
7676

77-
#[repr(C)]
7877
#[derive(Copy, Clone)]
7978
pub enum AttributePlace {
79+
ReturnValue,
8080
Argument(u32),
8181
Function,
8282
}
8383

8484
impl AttributePlace {
85-
pub fn ReturnValue() -> Self {
86-
AttributePlace::Argument(0)
87-
}
88-
8985
pub fn as_uint(self) -> c_uint {
9086
match self {
87+
AttributePlace::ReturnValue => 0,
88+
AttributePlace::Argument(i) => 1 + i,
9189
AttributePlace::Function => !0,
92-
AttributePlace::Argument(i) => i,
9390
}
9491
}
9592
}

0 commit comments

Comments
 (0)