Skip to content

Commit 52dbe4c

Browse files
committed
Fix merge error and rebasing changes for debug information.
1 parent df6052c commit 52dbe4c

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/comp/middle/ast_map.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ fn map_item(cx: ctx, i: @item) {
7373
}
7474
item_impl(_, _, ms) {
7575
for m in ms { cx.map.insert(m.node.id, node_method(m)); }
76+
}
7677
item_res(_, dtor_id, _, ctor_id) {
7778
cx.map.insert(ctor_id, node_res_ctor(i));
7879
cx.map.insert(dtor_id, node_item(i));

src/comp/middle/debuginfo.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import std::{vec, str, option, unsafe, fs, sys, ctypes};
1+
import core::{vec, str, option, sys, ctypes, unsafe};
2+
import std::fs;
23
import std::map::hashmap;
34
import lib::llvm::llvm;
45
import lib::llvm::llvm::ValueRef;
56
import middle::trans_common::*;
7+
import middle::trans_build::B;
68
import middle::ty;
79
import syntax::{ast, codemap};
810
import ast::ty;
@@ -66,7 +68,7 @@ fn llunused() -> ValueRef {
6668
lli32(0x0)
6769
}
6870
fn llnull() -> ValueRef unsafe {
69-
unsafe::reinterpret_cast(std::ptr::null::<ValueRef>())
71+
unsafe::reinterpret_cast(ptr::null::<ValueRef>())
7072
}
7173

7274
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)
621623
}
622624

623625
let name = alt local.node.pat.node {
624-
ast::pat_bind(ident) { ident }
626+
ast::pat_bind(ident, _) { ident /*XXX deal with optional node binding */ }
625627
};
626628
let loc = codemap::lookup_char_pos(cx.sess.get_codemap(),
627629
local.span.lo);
@@ -727,7 +729,7 @@ fn create_function(fcx: @fn_ctxt) -> @metadata<subprogram_md> {
727729
}
728730
ast_map::node_expr(expr) {
729731
alt expr.node {
730-
ast::expr_fn(f) {
732+
ast::expr_fn(f, _) {
731733
(dbg_cx.names.next("fn"), f.decl.output, expr.id)
732734
}
733735
}

src/comp/middle/trans_closure.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ fn trans_expr_fn(bcx: @block_ctxt, f: ast::_fn, sp: span,
336336
let sub_cx = extend_path(bcx.fcx.lcx, ccx.names.next("anon"));
337337
let s = mangle_internal_name_by_path(ccx, sub_cx.path);
338338
let llfn = decl_internal_cdecl_fn(ccx.llmod, s, llfnty);
339+
register_fn(ccx, sp, sub_cx.path, "anon fn", [], id);
339340

340341
let trans_closure_env = lambda(ck: ty::closure_kind) -> ValueRef {
341342
let upvars = get_freevars(ccx.tcx, id);

src/llvm

0 commit comments

Comments
 (0)