use back::link::exported_name;
use driver::session;
-use lib::llvm::ValueRef;
+use llvm::ValueRef;
use middle::subst;
use middle::subst::Subst;
use middle::trans::base::{set_llvm_fn_attrs, set_inline_hint};
use middle::trans::base::{trans_fn, decl_internal_rust_fn};
use middle::trans::base;
use middle::trans::common::*;
-use middle::trans::intrinsic;
use middle::ty;
use middle::typeck;
use util::ppaux::Repr;
use syntax::abi;
use syntax::ast;
use syntax::ast_map;
-use syntax::ast_util::local_def;
+use syntax::ast_util::{local_def, PostExpansionMethod};
use std::hash::{sip, Hash};
pub fn monomorphic_fn(ccx: &CrateContext,
} => {
let d = mk_lldecl();
set_llvm_fn_attrs(i.attrs.as_slice(), d);
- trans_fn(ccx, &**decl, &**body, d, &psubsts, fn_id.node, []);
+ trans_fn(ccx, &**decl, &**body, d, &psubsts, fn_id.node, [],
+ IgnoreItems);
d
}
_ => {
}
}
}
- ast_map::NodeForeignItem(i) => {
- let simple = intrinsic::get_simple_intrinsic(ccx, &*i);
- match simple {
- Some(decl) => decl,
- None => {
- let d = mk_lldecl();
- intrinsic::trans_intrinsic(ccx, d, &*i, &psubsts, ref_id);
- d
- }
- }
- }
ast_map::NodeVariant(v) => {
let parent = ccx.tcx.map.get_parent(fn_id.node);
let tvs = ty::enum_variants(ccx.tcx(), local_def(parent));
ast_map::NodeMethod(mth) => {
let d = mk_lldecl();
set_llvm_fn_attrs(mth.attrs.as_slice(), d);
- trans_fn(ccx, &*mth.decl, &*mth.body, d, &psubsts, mth.id, []);
+ trans_fn(ccx, &*mth.pe_fn_decl(), &*mth.pe_body(), d, &psubsts, mth.id, [],
+ IgnoreItems);
d
}
ast_map::NodeTraitMethod(method) => {
ast::Provided(mth) => {
let d = mk_lldecl();
set_llvm_fn_attrs(mth.attrs.as_slice(), d);
- trans_fn(ccx, &*mth.decl, &*mth.body, d, &psubsts, mth.id, []);
+ trans_fn(ccx, &*mth.pe_fn_decl(), &*mth.pe_body(), d,
+ &psubsts, mth.id, [], IgnoreItems);
d
}
_ => {
}
// Ugh -- but this ensures any new variants won't be forgotten
+ ast_map::NodeForeignItem(..) |
ast_map::NodeLifetime(..) |
ast_map::NodeExpr(..) |
ast_map::NodeStmt(..) |
}
}
+ &typeck::vtable_unboxed_closure(def_id) => {
+ MonoId {
+ def: def_id,
+ params: subst::VecPerParamSpace::empty(),
+ }
+ }
+
// can't this be checked at the callee?
_ => fail!("make_vtable_id needs vtable_static")
}