diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-06-30 14:46:17 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-06-30 18:36:12 +0200 |
| commit | 86f16b90cd694cd706469bb42737e63b1d9c1fdc (patch) | |
| tree | f81e107848cf5b8ba5488c6f4fbba20e38e0788e /src/comp/lib | |
| parent | 31ec26d46afe543508b4a11d33309afefa85b29a (diff) | |
| download | rust-86f16b90cd694cd706469bb42737e63b1d9c1fdc.tar.gz rust-86f16b90cd694cd706469bb42737e63b1d9c1fdc.zip | |
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.
Diffstat (limited to 'src/comp/lib')
| -rw-r--r-- | src/comp/lib/llvm.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index 460148ad1ee..b671b2485c0 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -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) { |
