Fix merge error and rebasing changes for debug information.

This commit is contained in:
Josh Matthews 2011-12-19 01:36:37 -05:00
parent df6052c4f8
commit 52dbe4cc1d
4 changed files with 9 additions and 5 deletions

View file

@ -73,6 +73,7 @@ fn map_item(cx: ctx, i: @item) {
}
item_impl(_, _, ms) {
for m in ms { cx.map.insert(m.node.id, node_method(m)); }
}
item_res(_, dtor_id, _, ctor_id) {
cx.map.insert(ctor_id, node_res_ctor(i));
cx.map.insert(dtor_id, node_item(i));

View file

@ -1,8 +1,10 @@
import std::{vec, str, option, unsafe, fs, sys, ctypes};
import core::{vec, str, option, sys, ctypes, unsafe};
import std::fs;
import std::map::hashmap;
import lib::llvm::llvm;
import lib::llvm::llvm::ValueRef;
import middle::trans_common::*;
import middle::trans_build::B;
import middle::ty;
import syntax::{ast, codemap};
import ast::ty;
@ -66,7 +68,7 @@ fn llunused() -> ValueRef {
lli32(0x0)
}
fn llnull() -> ValueRef unsafe {
unsafe::reinterpret_cast(std::ptr::null::<ValueRef>())
unsafe::reinterpret_cast(ptr::null::<ValueRef>())
}
fn add_named_metadata(cx: @crate_ctxt, name: str, val: ValueRef) {
@ -621,7 +623,7 @@ fn create_local_var(bcx: @block_ctxt, local: @ast::local)
}
let name = alt local.node.pat.node {
ast::pat_bind(ident) { ident }
ast::pat_bind(ident, _) { ident /*XXX deal with optional node binding */ }
};
let loc = codemap::lookup_char_pos(cx.sess.get_codemap(),
local.span.lo);
@ -727,7 +729,7 @@ fn create_function(fcx: @fn_ctxt) -> @metadata<subprogram_md> {
}
ast_map::node_expr(expr) {
alt expr.node {
ast::expr_fn(f) {
ast::expr_fn(f, _) {
(dbg_cx.names.next("fn"), f.decl.output, expr.id)
}
}

View file

@ -336,6 +336,7 @@ fn trans_expr_fn(bcx: @block_ctxt, f: ast::_fn, sp: span,
let sub_cx = extend_path(bcx.fcx.lcx, ccx.names.next("anon"));
let s = mangle_internal_name_by_path(ccx, sub_cx.path);
let llfn = decl_internal_cdecl_fn(ccx.llmod, s, llfnty);
register_fn(ccx, sp, sub_cx.path, "anon fn", [], id);
let trans_closure_env = lambda(ck: ty::closure_kind) -> ValueRef {
let upvars = get_freevars(ccx.tcx, id);