Skip to content

Commit 2ef0d99

Browse files
committed
---
yaml --- r: 31175 b: refs/heads/dist-snap c: ee73b78 h: refs/heads/master i: 31173: 01a4b14 31171: 2639462 31167: 7c57e4b v: v3
1 parent 558478a commit 2ef0d99

File tree

6 files changed

+28
-31
lines changed

6 files changed

+28
-31
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 28c1f21433a927bf9e3b399ec293cd7f7b688af6
10+
refs/heads/dist-snap: ee73b78e04860f0e4312e462c80ab8a6d37cd759
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/rustc/back/link.rs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import libc::{c_int, c_uint, c_char};
1+
import libc::{c_int, c_uint};
22
import driver::session;
33
import session::session;
44
import lib::llvm::llvm;
@@ -32,21 +32,6 @@ fn llvm_err(sess: session, msg: str) -> ! unsafe {
3232
} else { sess.fatal(msg + ": " + str::unsafe::from_c_str(cstr)); }
3333
}
3434

35-
fn WriteOutputFile(sess:session,
36-
PM: lib::llvm::PassManagerRef, M: ModuleRef,
37-
Triple: *c_char,
38-
// FIXME: When #2334 is fixed, change
39-
// c_uint to FileType
40-
Output: *c_char, FileType: c_uint,
41-
OptLevel: c_int,
42-
EnableSegmentedStacks: bool) {
43-
let result = llvm::LLVMRustWriteOutputFile(
44-
PM, M, Triple, Output, FileType, OptLevel, EnableSegmentedStacks);
45-
if (!result) {
46-
llvm_err(sess, "Could not write output");
47-
}
48-
}
49-
5035
mod write {
5136
fn is_object_or_assembly_or_exe(ot: output_type) -> bool {
5237
if ot == output_type_assembly || ot == output_type_object ||
@@ -175,8 +160,7 @@ mod write {
175160
sess.targ_cfg.target_strs.target_triple,
176161
|buf_t| {
177162
str::as_c_str(output, |buf_o| {
178-
WriteOutputFile(
179-
sess,
163+
llvm::LLVMRustWriteOutputFile(
180164
pm.llpm,
181165
llmod,
182166
buf_t,
@@ -197,8 +181,7 @@ mod write {
197181
sess.targ_cfg.target_strs.target_triple,
198182
|buf_t| {
199183
str::as_c_str(output, |buf_o| {
200-
WriteOutputFile(
201-
sess,
184+
llvm::LLVMRustWriteOutputFile(
202185
pm.llpm,
203186
llmod,
204187
buf_t,
@@ -217,8 +200,7 @@ mod write {
217200
sess.targ_cfg.target_strs.target_triple,
218201
|buf_t| {
219202
str::as_c_str(output, |buf_o| {
220-
WriteOutputFile(
221-
sess,
203+
llvm::LLVMRustWriteOutputFile(
222204
pm.llpm,
223205
llmod,
224206
buf_t,

branches/dist-snap/src/rustc/lib/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ extern mod llvm {
941941
// c_uint to FileType
942942
Output: *c_char, FileType: c_uint,
943943
OptLevel: c_int,
944-
EnableSegmentedStacks: bool) -> bool;
944+
EnableSegmentedStacks: bool);
945945

946946
/** Returns a string describing the last error caused by an LLVMRust*
947947
call. */

branches/dist-snap/src/rustllvm/RustWrapper.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extern "C" bool LLVMLinkModules(LLVMModuleRef Dest, LLVMModuleRef Src) {
7575
return true;
7676
}
7777

78-
extern "C" bool
78+
extern "C" void
7979
LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
8080
LLVMModuleRef M,
8181
const char *triple,
@@ -107,18 +107,13 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
107107
std::string ErrorInfo;
108108
raw_fd_ostream OS(path, ErrorInfo,
109109
raw_fd_ostream::F_Binary);
110-
if (ErrorInfo != "") {
111-
LLVMRustError = ErrorInfo.c_str();
112-
return false;
113-
}
114110
formatted_raw_ostream FOS(OS);
115111

116112
bool foo = Target->addPassesToEmitFile(*PM, FOS, FileType, NoVerify);
117113
assert(!foo);
118114
(void)foo;
119115
PM->run(*unwrap(M));
120116
delete Target;
121-
return true;
122117
}
123118

124119
extern "C" LLVMModuleRef LLVMRustParseAssemblyFile(const char *Filename) {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
iface clam<A: copy> {
2+
fn chowder(y: A);
3+
}
4+
class foo<A: copy> : clam<A> {
5+
let x: A;
6+
new(b: A) { self.x = b; }
7+
fn chowder(y: A) {
8+
}
9+
}
10+
11+
fn f<A: copy>(x: clam<A>, a: A) {
12+
x.chowder(a);
13+
}
14+
15+
fn main() {
16+
17+
let c = foo(42);
18+
let d: clam<int> = c as clam::<int>;
19+
f(d, c.x);
20+
}

branches/dist-snap/src/test/run-pass/pipe-select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// xfail
1+
// xfail-test
22
// xfail-pretty
33
// xfail-win32
44

0 commit comments

Comments
 (0)