about summary refs log tree commit diff
path: root/src/comp/lib
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-06-30 14:46:17 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-06-30 18:36:12 +0200
commit86f16b90cd694cd706469bb42737e63b1d9c1fdc (patch)
treef81e107848cf5b8ba5488c6f4fbba20e38e0788e /src/comp/lib
parent31ec26d46afe543508b4a11d33309afefa85b29a (diff)
downloadrust-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.rs7
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) {