Skip to content

Commit 3f66223

Browse files
committed
Merge pull request #19457 from reem/remove-is-lang-item
trans: Remove is_lang_item from base::invoke Reviewed-by: alexcrichton
2 parents 9c57d3f + f1e37f9 commit 3f66223

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

src/librustc_trans/trans/base.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -959,23 +959,14 @@ pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
959959
llfn: ValueRef,
960960
llargs: &[ValueRef],
961961
fn_ty: Ty<'tcx>,
962-
call_info: Option<NodeInfo>,
963-
// FIXME(15064) is_lang_item is a horrible hack, please remove it
964-
// at the soonest opportunity.
965-
is_lang_item: bool)
962+
call_info: Option<NodeInfo>)
966963
-> (ValueRef, Block<'blk, 'tcx>) {
967964
let _icx = push_ctxt("invoke_");
968965
if bcx.unreachable.get() {
969966
return (C_null(Type::i8(bcx.ccx())), bcx);
970967
}
971968

972-
// FIXME(15064) Lang item methods may (in the reflect case) not have proper
973-
// types, so doing an attribute lookup will fail.
974-
let attributes = if is_lang_item {
975-
llvm::AttrBuilder::new()
976-
} else {
977-
get_fn_llvm_attributes(bcx.ccx(), fn_ty)
978-
};
969+
let attributes = get_fn_llvm_attributes(bcx.ccx(), fn_ty);
979970

980971
match bcx.opt_node_id {
981972
None => {

src/librustc_trans/trans/callee.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,7 @@ pub fn trans_call_inner<'a, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
778778
llfn,
779779
llargs[],
780780
callee_ty,
781-
call_info,
782-
dest.is_none());
781+
call_info);
783782
bcx = b;
784783
llresult = llret;
785784

src/librustc_trans/trans/glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
292292
class_did,
293293
&[get_drop_glue_type(bcx.ccx(), t)],
294294
ty::mk_nil(bcx.tcx()));
295-
let (_, variant_cx) = invoke(variant_cx, dtor_addr, args[], dtor_ty, None, false);
295+
let (_, variant_cx) = invoke(variant_cx, dtor_addr, args[], dtor_ty, None);
296296

297297
variant_cx.fcx.pop_and_trans_custom_cleanup_scope(variant_cx, field_scope);
298298
variant_cx

0 commit comments

Comments
 (0)