Skip to content

Commit 6ed174f

Browse files
---
yaml --- r: 92338 b: refs/heads/auto c: 91efb2a h: refs/heads/master v: v3
1 parent b0530cf commit 6ed174f

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: b0100c5a0f43b5a2fadf839d90b6174dbddd0547
16+
refs/heads/auto: 91efb2a67f387773750b4ebc2290f16b14bf8e13
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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/auto/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)