diff options
| author | Graydon Hoare <[email protected]> | 2010-09-22 15:21:06 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-09-22 15:27:40 -0700 |
| commit | 738fe078a43c3f184d0e147f89042474a61fa779 (patch) | |
| tree | ea2ae75e06e951762cfec13f560a098076f25a21 /src/comp/driver | |
| parent | Add some basic string functions: index, rindes, find, substr, split, concat, ... (diff) | |
| download | rust-738fe078a43c3f184d0e147f89042474a61fa779.tar.xz rust-738fe078a43c3f184d0e147f89042474a61fa779.zip | |
Move llvm-using code in rustc to trans module.
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/rustc.rs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index d00d2e68..758e9145 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -1,21 +1,8 @@ // -*- rust -*- -import std._str; -import lib.llvm.llvm; -import lib.llvm.builder; import fe.parser; import fe.token; - -fn write_module() { - auto llmod = - llvm.LLVMModuleCreateWithNameInContext(_str.buf("rust_out"), - llvm.LLVMGetGlobalContext()); - - auto b = builder(llvm.LLVMCreateBuilder()); - - llvm.LLVMWriteBitcodeToFile(llmod, _str.buf("rust_out.bc")); - llvm.LLVMDisposeModule(llmod); -} +import me.trans; fn main(vec[str] args) { @@ -31,17 +18,13 @@ fn main(vec[str] args) { auto p = parser.new_parser(sess, filename); log "opened file: " + filename; auto crate = parser.parse_crate(p); + trans.translate_crate(sess, crate); } i += 1; } - - // Test LLVM module-writing. Nothing interesting yet. - write_module(); - } -// // Local Variables: // mode: rust // fill-column: 78; @@ -50,4 +33,3 @@ fn main(vec[str] args) { // buffer-file-coding-system: utf-8-unix // compile-command: "make -k -C ../.. 2>&1 | sed -e 's/\\/x\\//x:\\//g'"; // End: -// |