comparison 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
comparison
equal deleted inserted replaced
307:7ade5e035beb 308:6b62e8cdf970
85 case Tcomplex64: 85 case Tcomplex64:
86 case Tcomplex80: 86 case Tcomplex80:
87 return DtoComplexType(t); 87 return DtoComplexType(t);
88 88
89 // pointers 89 // pointers
90 case Tpointer: { 90 case Tpointer:
91 assert(t->next); 91 return getPtrToType(DtoType(t->next));
92 if (t->next->ty == Tvoid)
93 return (const LLType*)getPtrToType(LLType::Int8Ty);
94 else
95 return (const LLType*)getPtrToType(DtoType(t->next));
96 }
97 92
98 // arrays 93 // arrays
99 case Tarray: 94 case Tarray:
100 return DtoArrayType(t); 95 return DtoArrayType(t);
101 case Tsarray: 96 case Tsarray:
610 605
611 ////////////////////////////////////////////////////////////////////////////////////////// 606 //////////////////////////////////////////////////////////////////////////////////////////
612 607
613 const LLPointerType* getPtrToType(const LLType* t) 608 const LLPointerType* getPtrToType(const LLType* t)
614 { 609 {
610 if (t == LLType::VoidTy)
611 t = LLType::Int8Ty;
615 return LLPointerType::get(t, 0); 612 return LLPointerType::get(t, 0);
616 } 613 }
617 614
618 const LLPointerType* getVoidPtrType() 615 const LLPointerType* getVoidPtrType()
619 { 616 {