about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-03-20 15:15:57 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-03-20 15:16:12 -0700
commit56828d49fd469614ffea46bb6ea1053876ba2bfe (patch)
tree611313b8f4ed5c879c1b2318be0016b274ea6e78 /src
parentd282481c123e9a1155179c4b2338adbcba7589a3 (diff)
Remove unused "flav" parameter from function registration paths.
Diffstat (limited to 'src')
-rw-r--r--src/rustc/middle/trans/base.rs24
-rw-r--r--src/rustc/middle/trans/closure.rs2
-rw-r--r--src/rustc/middle/trans/native.rs6
3 files changed, 15 insertions, 17 deletions
diff --git a/src/rustc/middle/trans/base.rs b/src/rustc/middle/trans/base.rs
index efc604a58ae..a3b8dfd2154 100644
--- a/src/rustc/middle/trans/base.rs
+++ b/src/rustc/middle/trans/base.rs
@@ -4162,20 +4162,20 @@ fn get_pair_fn_ty(llpairty: TypeRef) -> TypeRef {
     ret struct_elt(llpairty, 0u);
 }
 
-fn register_fn(ccx: @crate_ctxt, sp: span, path: path, flav: str,
+fn register_fn(ccx: @crate_ctxt, sp: span, path: path,
                node_id: ast::node_id) -> ValueRef {
     let t = ty::node_id_to_type(ccx.tcx, node_id);
-    register_fn_full(ccx, sp, path, flav, node_id, t)
+    register_fn_full(ccx, sp, path, node_id, t)
 }
 
-fn register_fn_full(ccx: @crate_ctxt, sp: span, path: path, flav: str,
+fn register_fn_full(ccx: @crate_ctxt, sp: span, path: path,
                     node_id: ast::node_id, node_type: ty::t) -> ValueRef {
     let llfty = type_of_fn_from_ty(ccx, node_type);
-    register_fn_fuller(ccx, sp, path, flav, node_id, node_type,
+    register_fn_fuller(ccx, sp, path, node_id, node_type,
                        lib::llvm::CCallConv, llfty)
 }
 
-fn register_fn_fuller(ccx: @crate_ctxt, sp: span, path: path, _flav: str,
+fn register_fn_fuller(ccx: @crate_ctxt, sp: span, path: path,
                       node_id: ast::node_id, node_type: ty::t,
                       cc: lib::llvm::CallConv, llfty: TypeRef) -> ValueRef {
     let ps: str = mangle_exported_name(ccx, path, node_type);
@@ -4316,7 +4316,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
               }
               ast::item_fn(decl, _, _) {
                 let llfn = if decl.purity != ast::crust_fn {
-                    register_fn(ccx, i.span, my_path, "fn", i.id)
+                    register_fn(ccx, i.span, my_path, i.id)
                 } else {
                     native::register_crust_fn(ccx, i.span, my_path, i.id)
                 };
@@ -4331,7 +4331,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
                 // find the dtor symbol.
                 let t = ty::node_id_to_type(ccx.tcx, dtor_id);
                 register_fn_full(ccx, i.span, my_path + [path_name("dtor")],
-                                 "res_dtor", i.id, t)
+                                 i.id, t)
               }
             }
           }
@@ -4340,8 +4340,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
             let mty = ty::node_id_to_type(ccx.tcx, id);
             let pth = *pth + [path_name(ccx.names("meth")),
                               path_name(m.ident)];
-            let llfn = register_fn_full(ccx, m.span, pth, "impl_method",
-                                        id, mty);
+            let llfn = register_fn_full(ccx, m.span, pth, id, mty);
             set_inline_hint_if_appr(m.attrs, llfn);
             llfn
           }
@@ -4353,13 +4352,12 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
             alt check i.node {
               ast::item_res(_, _, _, _, _) {
                 let my_path = item_path(ccx, i);
-                let llctor = register_fn(ccx, i.span, my_path, "res_ctor",
-                                         id);
+                let llctor = register_fn(ccx, i.span, my_path, id);
                 set_inline_hint(llctor);
                 llctor
               }
               ast::item_class(_, _, ctor) {
-                register_fn(ccx, i.span, item_path(ccx, i), "ctor", id)
+                register_fn(ccx, i.span, item_path(ccx, i), id)
               }
             }
           }
@@ -4368,7 +4366,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
             let pth = *pth + [path_name(enm.ident), path_name(v.node.name)];
             let llfn = alt check enm.node {
               ast::item_enum(_, _) {
-                register_fn(ccx, v.span, pth, "enum", id)
+                register_fn(ccx, v.span, pth, id)
               }
             };
             set_inline_hint(llfn);
diff --git a/src/rustc/middle/trans/closure.rs b/src/rustc/middle/trans/closure.rs
index ad24195d901..225c22d5b40 100644
--- a/src/rustc/middle/trans/closure.rs
+++ b/src/rustc/middle/trans/closure.rs
@@ -370,7 +370,7 @@ fn trans_expr_fn(bcx: block,
     let sub_path = bcx.fcx.path + [path_name("anon")];
     let s = mangle_internal_name_by_path(ccx, sub_path);
     let llfn = decl_internal_cdecl_fn(ccx.llmod, s, llfnty);
-    register_fn(ccx, sp, sub_path, "anon fn", id);
+    register_fn(ccx, sp, sub_path, id);
 
     let trans_closure_env = fn@(ck: ty::closure_kind) -> ValueRef {
         let cap_vars = capture::compute_capture_vars(
diff --git a/src/rustc/middle/trans/native.rs b/src/rustc/middle/trans/native.rs
index 0ddfa2a4cec..938514c93b9 100644
--- a/src/rustc/middle/trans/native.rs
+++ b/src/rustc/middle/trans/native.rs
@@ -873,12 +873,12 @@ fn register_crust_fn(ccx: @crate_ctxt, sp: span,
         let ret_def = !ty::type_is_bot(ret_ty) && !ty::type_is_nil(ret_ty);
         let x86_64 = x86_64_tys(llargtys, llretty, ret_def);
         decl_x86_64_fn(x86_64) {|fnty|
-            register_fn_fuller(ccx, sp, path, "crust fn", node_id,
+            register_fn_fuller(ccx, sp, path, node_id,
                                t, lib::llvm::CCallConv, fnty)
         }
     } else {
         let llfty = T_fn(llargtys, llretty);
-        register_fn_fuller(ccx, sp, path, "crust fn", node_id,
+        register_fn_fuller(ccx, sp, path, node_id,
                            t, lib::llvm::CCallConv, llfty)
     }
 }
@@ -920,7 +920,7 @@ fn decl_native_fn(ccx: @crate_ctxt, i: @ast::native_item,
             // For true external functions: create a rust wrapper
             // and link to that.  The rust wrapper will handle
             // switching to the C stack.
-            register_fn(ccx, i.span, pth, "native fn", i.id)
+            register_fn(ccx, i.span, pth, i.id)
           }
         }
       }