use middle::trans::type_::Type;
use std::libc::c_uint;
-use std::str;
use syntax::ast;
pub fn trans_free(cx: @mut Block, v: ValueRef) -> @mut Block {
let name = mangle_internal_name_by_type_and_seq(ccx, t, "tydesc").to_managed();
note_unique_llvm_symbol(ccx, name);
debug!("+++ declare_tydesc %s %s", ppaux::ty_to_str(ccx.tcx, t), name);
- let gvar = str::as_c_str(name, |buf| {
+ let gvar = do name.as_c_str |buf| {
unsafe {
llvm::LLVMAddGlobal(ccx.llmod, ccx.tydesc_type.to_ref(), buf)
}
- });
+ };
let inf = @mut tydesc_info {
ty: t,
tydesc: gvar,