2011-06-27 18:03:01 -05:00
|
|
|
// Writing metadata into crate files
|
2011-06-15 13:19:50 -05:00
|
|
|
|
2011-05-17 13:41:41 -05:00
|
|
|
import std::str;
|
2011-05-12 10:24:54 -05:00
|
|
|
import middle::trans;
|
2011-07-05 04:48:19 -05:00
|
|
|
import syntax::ast::crate;
|
2011-05-12 10:24:54 -05:00
|
|
|
import back::x86;
|
|
|
|
import lib::llvm::llvm;
|
|
|
|
import lib::llvm::llvm::ValueRef;
|
|
|
|
import lib::llvm::False;
|
2011-03-11 17:35:20 -06:00
|
|
|
|
2011-06-27 16:00:04 -05:00
|
|
|
export write_metadata;
|
|
|
|
|
2011-05-12 10:24:54 -05:00
|
|
|
// Returns a Plain Old LLVM String:
|
2011-05-09 18:09:00 -05:00
|
|
|
fn C_postr(&str s) -> ValueRef {
|
2011-05-17 13:41:41 -05:00
|
|
|
ret llvm::LLVMConstString(str::buf(s), str::byte_len(s), False);
|
2011-03-11 17:35:20 -06:00
|
|
|
}
|
|
|
|
|
2011-06-27 17:20:17 -05:00
|
|
|
|
2011-03-26 19:35:51 -05:00
|
|
|
//
|
|
|
|
// Local Variables:
|
|
|
|
// mode: rust
|
|
|
|
// fill-column: 78;
|
|
|
|
// indent-tabs-mode: nil
|
|
|
|
// c-basic-offset: 4
|
|
|
|
// buffer-file-coding-system: utf-8-unix
|
|
|
|
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
|
|
|
// End:
|
|
|
|
//
|