]> git.lizzy.rs Git - rust.git/commitdiff
trans: Remove is_lang_item from base::invoke
authorJonathan Reem <jonathan.reem@gmail.com>
Tue, 2 Dec 2014 12:44:08 +0000 (07:44 -0500)
committerJonathan Reem <jonathan.reem@gmail.com>
Thu, 25 Dec 2014 06:52:47 +0000 (22:52 -0800)
Removes a FIXME on closed issue #15064. This flag is no
longer needed or used since reflection is gone.

src/librustc_trans/trans/base.rs
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/glue.rs

index f49fc7f06c5014a2b5e656af9da9d5fdddcd1770..68069151ad926a93e408f2e60b23996b2e86f40c 100644 (file)
@@ -983,23 +983,14 @@ pub fn invoke<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                           llfn: ValueRef,
                           llargs: &[ValueRef],
                           fn_ty: Ty<'tcx>,
-                          call_info: Option<NodeInfo>,
-                          // FIXME(15064) is_lang_item is a horrible hack, please remove it
-                          // at the soonest opportunity.
-                          is_lang_item: bool)
+                          call_info: Option<NodeInfo>)
                           -> (ValueRef, Block<'blk, 'tcx>) {
     let _icx = push_ctxt("invoke_");
     if bcx.unreachable.get() {
         return (C_null(Type::i8(bcx.ccx())), bcx);
     }
 
-    // FIXME(15064) Lang item methods may (in the reflect case) not have proper
-    // types, so doing an attribute lookup will fail.
-    let attributes = if is_lang_item {
-        llvm::AttrBuilder::new()
-    } else {
-        get_fn_llvm_attributes(bcx.ccx(), fn_ty)
-    };
+    let attributes = get_fn_llvm_attributes(bcx.ccx(), fn_ty);
 
     match bcx.opt_node_id {
         None => {
index 7f22faf050da04e98350e2e12fc98226c048d7da..afbaa0862a5b04ba9e38907e90dff6f73ec14df3 100644 (file)
@@ -778,8 +778,7 @@ pub fn trans_call_inner<'a, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
                                       llfn,
                                       llargs[],
                                       callee_ty,
-                                      call_info,
-                                      dest.is_none());
+                                      call_info);
         bcx = b;
         llresult = llret;
 
index 26734d854afc036f1a1d9ec9cff5048208233eac..6638edb535366e71ea72aa29035a5880d04d4fa5 100644 (file)
@@ -292,7 +292,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                      class_did,
                                      &[get_drop_glue_type(bcx.ccx(), t)],
                                      ty::mk_nil(bcx.tcx()));
-        let (_, variant_cx) = invoke(variant_cx, dtor_addr, args[], dtor_ty, None, false);
+        let (_, variant_cx) = invoke(variant_cx, dtor_addr, args[], dtor_ty, None);
 
         variant_cx.fcx.pop_and_trans_custom_cleanup_scope(variant_cx, field_scope);
         variant_cx