aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <[email protected]>2011-03-16 11:46:51 -0400
committerRafael Ávila de Espíndola <[email protected]>2011-03-16 11:46:51 -0400
commite65e1716a7086c365214e1b1c551c4d16af933d5 (patch)
treeb6e36abcb6164665e6a313fbd65cc676d13ecbef /src/comp
parentUpdate comment to reflect the decision to avoid cycles. (diff)
downloadrust-e65e1716a7086c365214e1b1c551c4d16af933d5.tar.xz
rust-e65e1716a7086c365214e1b1c551c4d16af933d5.zip
Revert 6fdb81fa17b3c7147a69edc5217c9f93ff485410, it is causing failures in
the bots.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/front/creader.rs23
-rw-r--r--src/comp/rustc.rc1
2 files changed, 3 insertions, 21 deletions
diff --git a/src/comp/front/creader.rs b/src/comp/front/creader.rs
index b8ad5a94..b922b378 100644
--- a/src/comp/front/creader.rs
+++ b/src/comp/front/creader.rs
@@ -22,29 +22,12 @@ type env = @rec(
// TODO: return something
fn load_crate(ast.ident ident, vec[str] library_search_paths) -> @() {
- auto filename = os.dylib_filename(ident);
for (str library_search_path in library_search_paths) {
- auto path = fs.connect(library_search_path, filename);
- auto pb = _str.buf(path);
- auto llmb = llvmext.LLVMRustCreateMemoryBufferWithContentsOfFile(pb);
- if ((llmb as int) != 0) {
- auto llof = mk_object_file(llmb);
- if ((llof.llof as int) != 0) {
- auto llsi = mk_section_iter(llof.llof);
- while ((llvmext.LLVMIsSectionIteratorAtEnd(llof.llof,
- llsi.llsi) as int) == 0) {
- // TODO: check name, pass contents off.
-
- llvmext.LLVMMoveToNextSection(llsi.llsi);
- }
- }
- }
+ auto path = fs.connect(library_search_path, ident);
+ // TODO
}
- // TODO: write line number of "use" statement
- log #fmt("can't find a crate named '%s' (looked for '%s' in %s)",
- ident, filename, _str.connect(library_search_paths, ", "));
- fail;
+ ret @();
}
fn fold_view_item_use(&env e, &span sp, ast.ident ident,
diff --git a/src/comp/rustc.rc b/src/comp/rustc.rc
index 4bf1161d..7f1a7a03 100644
--- a/src/comp/rustc.rc
+++ b/src/comp/rustc.rc
@@ -42,7 +42,6 @@ mod util {
}
auth driver.rustc.main = impure;
-auth front.creader.load_crate = unsafe;
auth middle.metadata = unsafe;
auth middle.trans = unsafe;
auth middle.trans.copy_args_to_allocas = impure;