Skip to content

Commit 4bb0a10

Browse files
committed
auto merge of #19457 : reem/rust/remove-is-lang-item, r=eddyb
Removes a FIXME on closed issue #15064. This flag is no longer needed or used since reflection is gone.
2 parents 738d980 + e5c90d4 commit 4bb0a10

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
@@ -967,23 +967,14 @@ pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
967967
llfn: ValueRef,
968968
llargs: Vec<ValueRef> ,
969969
fn_ty: Ty<'tcx>,
970-
call_info: Option<NodeInfo>,
971-
// FIXME(15064) is_lang_item is a horrible hack, please remove it
972-
// at the soonest opportunity.
973-
is_lang_item: bool)
970+
call_info: Option<NodeInfo>)
974971
-> (ValueRef, Block<'blk, 'tcx>) {
975972
let _icx = push_ctxt("invoke_");
976973
if bcx.unreachable.get() {
977974
return (C_null(Type::i8(bcx.ccx())), bcx);
978975
}
979976

980-
// FIXME(15064) Lang item methods may (in the reflect case) not have proper
981-
// types, so doing an attribute lookup will fail.
982-
let attributes = if is_lang_item {
983-
llvm::AttrBuilder::new()
984-
} else {
985-
get_fn_llvm_attributes(bcx.ccx(), fn_ty)
986-
};
977+
let attributes = get_fn_llvm_attributes(bcx.ccx(), fn_ty);
987978

988979
match bcx.opt_node_id {
989980
None => {

src/librustc_trans/trans/callee.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,7 @@ pub fn trans_call_inner<'a, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
810810
llfn,
811811
llargs,
812812
callee_ty,
813-
call_info,
814-
dest.is_none());
813+
call_info);
815814
bcx = b;
816815
llresult = llret;
817816

src/librustc_trans/trans/glue.rs

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

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

0 commit comments

Comments
 (0)