comparison gen/toir.cpp @ 857:217e8c719a2f

Apply wilsonk's patch to AddrExp::toConstElem for struct literals.
author Christian Kamm <kamm incasoftware de>
date Wed, 17 Dec 2008 20:40:27 +0100
parents 331a176c1f4f
children ebbbf8c3ce93
comparison
equal deleted inserted replaced
856:bdb3627265eb 857:217e8c719a2f
985 LLConstant* gep = llvm::ConstantExpr::getGetElementPtr(isaConstant(vd->ir.irGlobal->value), idxs, 2); 985 LLConstant* gep = llvm::ConstantExpr::getGetElementPtr(isaConstant(vd->ir.irGlobal->value), idxs, 2);
986 986
987 // bitcast to requested type 987 // bitcast to requested type
988 assert(type->toBasetype()->ty == Tpointer); 988 assert(type->toBasetype()->ty == Tpointer);
989 return DtoBitCast(gep, DtoType(type)); 989 return DtoBitCast(gep, DtoType(type));
990 }
991 else if (e1->op == TOKstructliteral)
992 {
993 StructLiteralExp* slexp = (StructLiteralExp*)e1;
994 LLConstant* lit = slexp->toConstElem(p);
995 return lit;
990 } 996 }
991 // not yet supported 997 // not yet supported
992 else 998 else
993 { 999 {
994 Lerr: 1000 Lerr: