comparison gen/tollvm.cpp @ 1218:7977096f0e49

Name some types.
author Frits van Bommel <fvbommel wxs.nl>
date Wed, 15 Apr 2009 21:37:01 +0200
parents 7e5547d8e59f
children f41ff8ccc249 1e699a4e9759
comparison
equal deleted inserted replaced
1217:00a84912c689 1218:7977096f0e49
98 98
99 // arrays 99 // arrays
100 case Tarray: 100 case Tarray:
101 { 101 {
102 t->irtype = new IrTypeArray(t); 102 t->irtype = new IrTypeArray(t);
103 return t->irtype->get(); 103 const LLType* arrty = t->irtype->get();
104 gIR->module->addTypeName(t->toChars(), arrty);
105 return arrty;
104 } 106 }
105 107
106 case Tsarray: 108 case Tsarray:
107 { 109 {
108 t->irtype = new IrTypeSArray(t); 110 t->irtype = new IrTypeSArray(t);
109 return t->irtype->get(); 111 const LLType* arrty = t->irtype->get();
112 gIR->module->addTypeName(t->toChars(), arrty);
113 return arrty;
110 } 114 }
111 115
112 // aggregates 116 // aggregates
113 case Tstruct: { 117 case Tstruct: {
114 #if DMDV2 118 #if DMDV2
230 { 234 {
231 assert(t->ty == Tdelegate); 235 assert(t->ty == Tdelegate);
232 const LLType* i8ptr = getVoidPtrType(); 236 const LLType* i8ptr = getVoidPtrType();
233 const LLType* func = DtoFunctionType(t->nextOf(), NULL, Type::tvoid->pointerTo()); 237 const LLType* func = DtoFunctionType(t->nextOf(), NULL, Type::tvoid->pointerTo());
234 const LLType* funcptr = getPtrToType(func); 238 const LLType* funcptr = getPtrToType(func);
235 return LLStructType::get(i8ptr, funcptr, NULL); 239 const LLStructType* dgtype = LLStructType::get(i8ptr, funcptr, NULL);
240 gIR->module->addTypeName(t->toChars(), dgtype);
241 return dgtype;
236 } 242 }
237 243
238 ////////////////////////////////////////////////////////////////////////////////////////// 244 //////////////////////////////////////////////////////////////////////////////////////////
239 245
240 LLValue* DtoDelegateEquals(TOK op, LLValue* lhs, LLValue* rhs) 246 LLValue* DtoDelegateEquals(TOK op, LLValue* lhs, LLValue* rhs)