Skip to content

Commit e85abfe

Browse files
---
yaml --- r: 147268 b: refs/heads/try2 c: 91efb2a h: refs/heads/master v: v3
1 parent 21de848 commit e85abfe

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: b0100c5a0f43b5a2fadf839d90b6174dbddd0547
8+
refs/heads/try2: 91efb2a67f387773750b4ebc2290f16b14bf8e13
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/trans/base.rs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,11 @@ pub fn trans_external_path(ccx: &mut CrateContext, did: ast::DefId, t: ty::t) ->
875875
}
876876
}
877877
878-
pub fn invoke(bcx: @mut Block, llfn: ValueRef, llargs: ~[ValueRef],
879-
attributes: &[(uint, lib::llvm::Attribute)])
878+
pub fn invoke(bcx: @mut Block,
879+
llfn: ValueRef,
880+
llargs: ~[ValueRef],
881+
attributes: &[(uint, lib::llvm::Attribute)],
882+
call_info: Option<NodeInfo>)
880883
-> (ValueRef, @mut Block) {
881884
let _icx = push_ctxt("invoke_");
882885
if bcx.unreachable {
@@ -899,11 +902,18 @@ pub fn invoke(bcx: @mut Block, llfn: ValueRef, llargs: ~[ValueRef],
899902
}
900903
}
901904
let normal_bcx = sub_block(bcx, "normal return");
905+
let landing_pad = get_landing_pad(bcx);
906+
907+
match call_info {
908+
Some(info) => debuginfo::set_source_location(bcx.fcx, info.id, info.span),
909+
None => debuginfo::clear_source_location(bcx.fcx)
910+
};
911+
902912
let llresult = Invoke(bcx,
903913
llfn,
904914
llargs,
905915
normal_bcx.llbb,
906-
get_landing_pad(bcx),
916+
landing_pad,
907917
attributes);
908918
return (llresult, normal_bcx);
909919
} else {
@@ -913,6 +923,12 @@ pub fn invoke(bcx: @mut Block, llfn: ValueRef, llargs: ~[ValueRef],
913923
debug!("arg: {}", llarg);
914924
}
915925
}
926+
927+
match call_info {
928+
Some(info) => debuginfo::set_source_location(bcx.fcx, info.id, info.span),
929+
None => debuginfo::clear_source_location(bcx.fcx)
930+
};
931+
916932
let llresult = Call(bcx, llfn, llargs, attributes);
917933
return (llresult, bcx);
918934
}

branches/try2/src/librustc/middle/trans/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ pub fn trans_call_inner(in_cx: @mut Block,
697697
}
698698

699699
// Invoke the actual rust fn and update bcx/llresult.
700-
let (llret, b) = base::invoke(bcx, llfn, llargs, attrs);
700+
let (llret, b) = base::invoke(bcx, llfn, llargs, attrs, call_info);
701701
bcx = b;
702702
llresult = llret;
703703

branches/try2/src/librustc/middle/trans/glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ pub fn trans_struct_drop(bcx: @mut Block, t: ty::t, v0: ValueRef, dtor_did: ast:
429429
add_clean(bcx, llfld_a, fld.mt.ty);
430430
}
431431

432-
let (_, bcx) = invoke(bcx, dtor_addr, args, []);
432+
let (_, bcx) = invoke(bcx, dtor_addr, args, [], None);
433433
bcx
434434
})
435435
}

0 commit comments

Comments
 (0)