1
Fork 0

Support type parameters in resources

Some rather dodgy code was added to trans in the process. I'd love to
discuss it with someone who knows more about types during translation.
This commit is contained in:
Marijn Haverbeke 2011-06-30 14:46:17 +02:00
parent 31ec26d46a
commit 86f16b90cd
8 changed files with 163 additions and 65 deletions

View file

@ -1570,6 +1570,13 @@ fn type_to_str_inner(type_names names,
}
}
fn fn_ty_param_tys(TypeRef fn_ty) -> vec[TypeRef] {
auto args = vec::init_elt(0 as TypeRef, llvm::LLVMCountParamTypes(fn_ty));
llvm::LLVMGetParamTypes(fn_ty, vec::buf(args));
ret args;
}
/* Memory-managed interface to target data. */
obj target_data_dtor(TargetDataRef TD) {