Skip to content

Commit 78c94a0

Browse files
committed
---
yaml --- r: 57011 b: refs/heads/try c: d3a58f3 h: refs/heads/master i: 57009: 001a139 57007: 3c3ba77 v: v3
1 parent 83a8a70 commit 78c94a0

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: 9618e5b459198865ab70ba7cf3a3edffdef1f7f5
5+
refs/heads/try: d3a58f37979496efdf15bf016ebccc17b007a6cc
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/trans/cabi_x86.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use driver::session::os_win32;
11+
use driver::session::{os_win32, os_macos};
1212
use core::option::*;
1313
use lib::llvm::*;
1414
use lib::llvm::llvm::*;
@@ -38,12 +38,12 @@ impl ABIInfo for X86_ABIInfo {
3838

3939
// Rules for returning structs taken from
4040
// http://www.angelcode.com/dev/callconv/callconv.html
41+
// Clang's ABI handling is in lib/CodeGen/TargetInfo.cpp
4142
let sret = {
4243
let returning_a_struct = unsafe { LLVMGetTypeKind(rty) == Struct && ret_def };
43-
let big_struct = if self.ccx.sess.targ_cfg.os != os_win32 {
44-
true
45-
} else {
46-
llsize_of_alloc(self.ccx, rty) > 8
44+
let big_struct = match self.ccx.sess.targ_cfg.os {
45+
os_win32 | os_macos => llsize_of_alloc(self.ccx, rty) > 8,
46+
_ => true
4747
};
4848
returning_a_struct && big_struct
4949
};

branches/try/src/test/run-pass/extern-pass-TwoU32s.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// Test a foreign function that accepts and returns a struct
1212
// by value.
1313

14-
// xfail-macos Broken on mac i686
15-
1614
#[deriving(Eq)]
1715
struct TwoU32s {
1816
one: u32, two: u32

branches/try/src/test/run-pass/extern-return-TwoU32s.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-macos Broken on mac i686
12-
1311
struct TwoU32s {
1412
one: u32, two: u32
1513
}

0 commit comments

Comments
 (0)