comparison gen/toir.cpp @ 1556:4897323d47b5

ConstantAggregateZero moved back to LLVM 2.5-style API Requires LLVM >= 77635
author Benjamin Kramer <benny.kra@gmail.com>
date Fri, 31 Jul 2009 01:16:30 +0200
parents d6e8d5db259f
children 06d5cc873350
comparison
equal deleted inserted replaced
1555:ed0cffe895ec 1556:4897323d47b5
336 Logger::print("NullExp::toConstElem(type=%s): %s\n", type->toChars(),toChars()); 336 Logger::print("NullExp::toConstElem(type=%s): %s\n", type->toChars(),toChars());
337 LOG_SCOPE; 337 LOG_SCOPE;
338 const LLType* t = DtoType(type); 338 const LLType* t = DtoType(type);
339 if (type->ty == Tarray) { 339 if (type->ty == Tarray) {
340 assert(isaStruct(t)); 340 assert(isaStruct(t));
341 return gIR->context().getConstantAggregateZero(t); 341 return llvm::ConstantAggregateZero::get(t);
342 } 342 }
343 else { 343 else {
344 return gIR->context().getNullValue(t); 344 return gIR->context().getNullValue(t);
345 } 345 }
346 assert(0); 346 assert(0);