diff gen/tollvm.cpp @ 649:505f41873d4f

Automated merge with http://hg.dsource.org/projects/llvmdc
author Christian Kamm <kamm incasoftware de>
date Sun, 05 Oct 2008 11:47:59 +0200
parents 8d850fa25713
children aa6a0b7968f7
line wrap: on
line diff
--- a/gen/tollvm.cpp	Sun Oct 05 02:01:50 2008 +0200
+++ b/gen/tollvm.cpp	Sun Oct 05 11:47:59 2008 +0200
@@ -169,6 +169,16 @@
         return getPtrToType(LLStructType::get(DtoType(taa->key), DtoType(taa->next), 0));
     }
 
+/*
+    Not needed atm as VarDecls for tuples are rewritten as a string of 
+    VarDecls for the fields (u -> _u_field_0, ...)
+
+    case Ttuple:
+    {
+        TypeTuple* ttupl = (TypeTuple*)t;
+        return DtoStructTypeFromArguments(ttupl->arguments);
+    }
+*/
     // opaque type
     case Topaque:
         return llvm::OpaqueType::get();
@@ -182,6 +192,26 @@
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
+/*
+const LLType* DtoStructTypeFromArguments(Arguments* arguments)
+{
+    if (!arguments)
+        return LLType::VoidTy;
+
+    std::vector<const LLType*> types;
+    for (size_t i = 0; i < arguments->dim; i++)
+    {
+        Argument *arg = (Argument *)arguments->data[i];
+        assert(arg && arg->type);
+
+        types.push_back(DtoType(arg->type));
+    }
+    return LLStructType::get(types);
+}
+*/
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
 const LLType* DtoTypeNotVoid(Type* t)
 {
     const LLType* lt = DtoType(t);