Mercurial > projects > ldc
diff gen/tollvm.cpp @ 308:6b62e8cdf970 trunk
[svn r329] Cleaned up a bunch of array code for handling special slice cases no
longer relevant.
author | lindquist |
---|---|
date | Sat, 28 Jun 2008 05:57:16 +0200 |
parents | a9dae3da4e87 |
children | d59c363fccad |
line wrap: on
line diff
--- a/gen/tollvm.cpp Sat Jun 28 03:45:18 2008 +0200 +++ b/gen/tollvm.cpp Sat Jun 28 05:57:16 2008 +0200 @@ -87,13 +87,8 @@ return DtoComplexType(t); // pointers - case Tpointer: { - assert(t->next); - if (t->next->ty == Tvoid) - return (const LLType*)getPtrToType(LLType::Int8Ty); - else - return (const LLType*)getPtrToType(DtoType(t->next)); - } + case Tpointer: + return getPtrToType(DtoType(t->next)); // arrays case Tarray: @@ -612,6 +607,8 @@ const LLPointerType* getPtrToType(const LLType* t) { + if (t == LLType::VoidTy) + t = LLType::Int8Ty; return LLPointerType::get(t, 0); }