Build fix.
This commit is contained in:
parent
e383004985
commit
fa6d871e11
@ -253,6 +253,9 @@ fn get_ty_metadata(cx: @crate_ctxt, t: ty::t, ty: @ast::ty) -> @metadata<tydesc_
|
||||
let llnode = llmdnode(lldata);
|
||||
let mdval = @{node: llnode, data: {hash: ty::hash_ty(t)}};
|
||||
update_cache(cache, BasicTypeDescriptorTag, tydesc_metadata(mdval));
|
||||
llvm::LLVMAddNamedMetadataOperand(cx.llmod, as_buf("llvm.dbg.ty"),
|
||||
str::byte_len("llvm.dbg.ty"),
|
||||
llnode);
|
||||
ret mdval;
|
||||
}
|
||||
|
||||
@ -295,21 +298,21 @@ fn get_local_var_metadata(bcx: @block_ctxt, local: @ast::local)
|
||||
}
|
||||
};
|
||||
let declargs = [llmdnode([llptr]), mdnode];
|
||||
let instr = trans_build::Call(bcx, cx.intrinsics.get("llvm.dbg.declare"),
|
||||
declargs);
|
||||
trans_build::Call(bcx, cx.intrinsics.get("llvm.dbg.declare"),
|
||||
declargs);
|
||||
llvm::LLVMAddNamedMetadataOperand(cx.llmod, as_buf("llvm.dbg.vars"),
|
||||
str::byte_len("llvm.dbg.vars"),
|
||||
mdnode);
|
||||
ret mdval;
|
||||
}
|
||||
|
||||
fn update_source_pos<T>(cx: @block_ctxt, s: T) {
|
||||
fn update_source_pos(cx: @block_ctxt, s: codemap::span) {
|
||||
if !bcx_ccx(cx).sess.get_opts().debuginfo {
|
||||
ret;
|
||||
}
|
||||
cx.source_pos = option::some(
|
||||
codemap::lookup_char_pos(bcx_ccx(cx).sess.get_codemap(),
|
||||
s.span.lo)); //XXX maybe hi
|
||||
s.lo)); //XXX maybe hi
|
||||
|
||||
}
|
||||
|
||||
|
@ -3519,7 +3519,7 @@ fn trans_temp_expr(bcx: @block_ctxt, e: @ast::expr) -> result {
|
||||
// - exprs with non-immediate type never get dest=by_val
|
||||
fn trans_expr(bcx: @block_ctxt, e: @ast::expr, dest: dest) -> @block_ctxt {
|
||||
let tcx = bcx_tcx(bcx);
|
||||
debuginfo::update_source_pos(bcx, e);
|
||||
debuginfo::update_source_pos(bcx, e.span);
|
||||
|
||||
if expr_is_lval(bcx, e) {
|
||||
ret lval_to_dps(bcx, e, dest);
|
||||
@ -4014,7 +4014,7 @@ fn trans_stmt(cx: @block_ctxt, s: ast::stmt) -> @block_ctxt {
|
||||
}
|
||||
|
||||
let bcx = cx;
|
||||
debuginfo::update_source_pos(cx, s);
|
||||
debuginfo::update_source_pos(cx, s.span);
|
||||
|
||||
alt s.node {
|
||||
ast::stmt_expr(e, _) { bcx = trans_expr(cx, e, ignore); }
|
||||
@ -4263,7 +4263,7 @@ fn trans_block(bcx: @block_ctxt, b: ast::blk) -> @block_ctxt {
|
||||
fn trans_block_dps(bcx: @block_ctxt, b: ast::blk, dest: dest)
|
||||
-> @block_ctxt {
|
||||
let bcx = bcx;
|
||||
debuginfo::update_source_pos(bcx, b);
|
||||
debuginfo::update_source_pos(bcx, b.span);
|
||||
block_locals(b) {|local| bcx = alloc_local(bcx, local); };
|
||||
for s: @ast::stmt in b.node.stmts {
|
||||
bcx = trans_stmt(bcx, *s);
|
||||
|
Loading…
Reference in New Issue
Block a user