Long lines.

This commit is contained in:
Josh Matthews 2011-12-19 02:52:21 -05:00
parent 52dbe4cc1d
commit 1d3d28bdf1
3 changed files with 17 additions and 12 deletions

View File

@ -73,7 +73,8 @@ fn llnull() -> ValueRef unsafe {
fn add_named_metadata(cx: @crate_ctxt, name: str, val: ValueRef) {
str::as_buf(name, {|sbuf|
llvm::LLVMAddNamedMetadataOperand(cx.llmod, sbuf, str::byte_len(name), val)
llvm::LLVMAddNamedMetadataOperand(cx.llmod, sbuf, str::byte_len(name),
val)
})
}
@ -378,8 +379,9 @@ fn create_derived_type(type_tag: int, file: ValueRef, name: str, line: int,
fn add_member(cx: @struct_ctxt, name: str, line: int, size: int, align: int,
ty: ValueRef) {
cx.members += [create_derived_type(MemberTag, cx.file, name, line, size * 8,
align * 8, cx.total_size, ty)];
cx.members += [create_derived_type(MemberTag, cx.file, name, line,
size * 8, align * 8, cx.total_size,
ty)];
cx.total_size += size * 8;
}
@ -477,7 +479,7 @@ fn create_vec(cx: @crate_ctxt, vec_t: ty::t, elem_t: ty::t, vec_ty: @ast::ty)
arr_size, arr_align, 0,
option::some(elem_ty_md.node),
option::some([subrange]));
add_member(scx, "data", 0, 0, // according to an equivalent clang dump, the size should be 0
add_member(scx, "data", 0, 0, // clang says the size should be 0
sys::align_of::<u8>() as int, data_ptr);
let llnode = finish_structure(scx);
ret @{node: llnode, data: {hash: vec_t}};
@ -521,7 +523,8 @@ fn member_size_and_align(ty: @ast::ty) -> (int, int) {
}
}
fn create_ty(cx: @crate_ctxt, t: ty::t, ty: @ast::ty) -> @metadata<tydesc_md> {
fn create_ty(cx: @crate_ctxt, t: ty::t, ty: @ast::ty)
-> @metadata<tydesc_md> {
/*let cache = get_cache(cx);
alt cached_metadata::<@metadata<tydesc_md>>(
cache, tg, {|md| t == md.data.hash}) {
@ -623,7 +626,7 @@ fn create_local_var(bcx: @block_ctxt, local: @ast::local)
}
let name = alt local.node.pat.node {
ast::pat_bind(ident, _) { ident /*XXX deal with optional node binding */ }
ast::pat_bind(ident, _) { ident /*XXX deal w/ optional node binding*/ }
};
let loc = codemap::lookup_char_pos(cx.sess.get_codemap(),
local.span.lo);

View File

@ -4562,7 +4562,8 @@ fn trans_fn(cx: @local_ctxt, sp: span, f: ast::_fn, llfndecl: ValueRef,
let do_time = cx.ccx.sess.get_opts().stats;
let start = do_time ? time::get_time() : {sec: 0u32, usec: 0u32};
let fcx = option::none;
trans_closure(cx, sp, f, llfndecl, ty_self, ty_params, id, {|new_fcx| fcx = option::some(new_fcx);});
trans_closure(cx, sp, f, llfndecl, ty_self, ty_params, id,
{|new_fcx| fcx = option::some(new_fcx);});
if cx.ccx.sess.get_opts().extra_debuginfo {
debuginfo::create_function(option::get(fcx));
}

View File

@ -631,7 +631,8 @@ fn Trap(cx: @block_ctxt) {
assert (T as int != 0);
let Args: [ValueRef] = [];
unsafe {
llvm::LLVMBuildCall(b, T, vec::to_ptr(Args), vec::len(Args), noname());
llvm::LLVMBuildCall(b, T, vec::to_ptr(Args), vec::len(Args),
noname());
}
}