Skip to content

Commit 2f440b1

Browse files
committed
rustc: lowercase the link and link::write modules
1 parent 0d32ff7 commit 2f440b1

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/comp/back/Link.rs renamed to src/comp/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn link_intrinsics(session::session sess, ModuleRef llmod) {
5050
}
5151
}
5252

53-
mod Write {
53+
mod write {
5454
fn is_object_or_assembly(output_type ot) -> bool {
5555
if (ot == output_type_assembly) {
5656
ret true;

src/comp/driver/rustc.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import middle::resolve;
1010
import middle::ty;
1111
import middle::typeck;
1212
import middle::typestate_check;
13-
import back::Link;
13+
import back::link;
1414
import lib::llvm;
1515
import util::common;
1616

@@ -29,7 +29,7 @@ import std::getopts::optmulti;
2929
import std::getopts::optflag;
3030
import std::getopts::opt_present;
3131

32-
import back::Link::output_type;
32+
import back::link::output_type;
3333

3434
fn default_environment(session::session sess,
3535
str argv0,
@@ -87,7 +87,7 @@ fn compile_input(session::session sess,
8787
auto p = parser::new_parser(sess, env, def, input, 0u, 0u);
8888
auto crate = time(time_passes, "parsing",
8989
bind parse_input(sess, p, input));
90-
if (sess.get_opts().output_type == Link::output_type_none) {ret;}
90+
if (sess.get_opts().output_type == link::output_type_none) {ret;}
9191

9292
crate = time(time_passes, "external crate reading",
9393
bind creader::read_crates(sess, crate));
@@ -112,7 +112,7 @@ fn compile_input(session::session sess,
112112
type_cache, output));
113113

114114
time[()](time_passes, "LLVM passes",
115-
bind Link::Write::run_passes(sess, llmod, output));
115+
bind link::write::run_passes(sess, llmod, output));
116116
}
117117

118118
fn pretty_print_input(session::session sess,
@@ -241,13 +241,13 @@ fn main(vec[str] args) {
241241
auto output_file = getopts::opt_maybe_str(match, "o");
242242
auto library_search_paths = getopts::opt_strs(match, "L");
243243

244-
auto output_type = Link::output_type_bitcode;
244+
auto output_type = link::output_type_bitcode;
245245
if (opt_present(match, "parse-only")) {
246-
output_type = Link::output_type_none;
246+
output_type = link::output_type_none;
247247
} else if (opt_present(match, "S")) {
248-
output_type = Link::output_type_assembly;
248+
output_type = link::output_type_assembly;
249249
} else if (opt_present(match, "c")) {
250-
output_type = Link::output_type_object;
250+
output_type = link::output_type_object;
251251
}
252252

253253
auto verify = !opt_present(match, "noverify");
@@ -317,10 +317,10 @@ fn main(vec[str] args) {
317317
let vec[str] parts = _str::split(ifile, '.' as u8);
318318
_vec::pop[str](parts);
319319
alt (output_type) {
320-
case (Link::output_type_none) { parts += vec("pp"); }
321-
case (Link::output_type_bitcode) { parts += vec("bc"); }
322-
case (Link::output_type_assembly) { parts += vec("s"); }
323-
case (Link::output_type_object) { parts += vec("o"); }
320+
case (link::output_type_none) { parts += vec("pp"); }
321+
case (link::output_type_bitcode) { parts += vec("bc"); }
322+
case (link::output_type_assembly) { parts += vec("s"); }
323+
case (link::output_type_object) { parts += vec("o"); }
324324
}
325325
auto ofile = _str::connect(parts, ".");
326326
compile_input(sess, env, ifile, ofile);

src/comp/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type options = rec(bool shared,
3434
bool stats,
3535
bool time_passes,
3636
bool time_llvm_passes,
37-
back::Link::output_type output_type,
37+
back::link::output_type output_type,
3838
vec[str] library_search_paths,
3939
str sysroot);
4040

src/comp/middle/trans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import front::ast;
1414
import front::creader;
1515
import driver::session;
1616
import middle::ty;
17-
import back::Link;
17+
import back::link;
1818
import back::x86;
1919
import back::abi;
2020
import back::upcall;
@@ -7892,7 +7892,7 @@ fn make_common_glue(&session::session sess, &str output) {
78927892
trans::trans_exit_task_glue(glues, new_str_hash[ValueRef](), tn,
78937893
llmod);
78947894

7895-
Link::Write::run_passes(sess, llmod, output);
7895+
link::write::run_passes(sess, llmod, output);
78967896
}
78977897

78987898
fn create_module_map(&@crate_ctxt ccx) -> ValueRef {

src/comp/rustc.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ mod front {
3939
}
4040

4141
mod back {
42-
mod Link;
42+
mod link;
4343
mod abi;
4444
mod upcall;
4545
mod x86;

0 commit comments

Comments
 (0)