Skip to content

Commit b294cb3

Browse files
committed
---
yaml --- r: 72112 b: refs/heads/dist-snap c: d3a58f3 h: refs/heads/master v: v3
1 parent 20d9f07 commit b294cb3

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
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 9618e5b459198865ab70ba7cf3a3edffdef1f7f5
10+
refs/heads/dist-snap: d3a58f37979496efdf15bf016ebccc17b007a6cc
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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/dist-snap/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/dist-snap/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)