Mercurial > projects > ldc
comparison ir/irstruct.cpp @ 1554:d6e8d5db259f
LLVMContext changes up to r77366
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Thu, 30 Jul 2009 15:25:10 +0200 |
parents | 7fcb72d518f6 |
children | 1d5c3354b3c2 |
comparison
equal
deleted
inserted
replaced
1553:f55ca8a1598c | 1554:d6e8d5db259f |
---|---|
193 { | 193 { |
194 add_zeros(constants, aggrdecl->structsize - offset); | 194 add_zeros(constants, aggrdecl->structsize - offset); |
195 } | 195 } |
196 | 196 |
197 // build constant struct | 197 // build constant struct |
198 llvm::Constant* definit = gIR->context().getConstantStruct(constants, packed); | 198 llvm::Constant* definit = LLConstantStruct::get(constants, packed); |
199 #if 0 | 199 #if 0 |
200 IF_LOG Logger::cout() << "final default initializer: " << *definit << std::endl; | 200 IF_LOG Logger::cout() << "final default initializer: " << *definit << std::endl; |
201 #endif | 201 #endif |
202 | 202 |
203 return definit; | 203 return definit; |
382 add_zeros(constants, diff); | 382 add_zeros(constants, diff); |
383 } | 383 } |
384 | 384 |
385 // build constant | 385 // build constant |
386 assert(!constants.empty()); | 386 assert(!constants.empty()); |
387 llvm::Constant* c = gIR->context().getConstantStruct(&constants[0], constants.size(), packed); | 387 llvm::Constant* c = LLConstantStruct::get(&constants[0], constants.size(), packed); |
388 IF_LOG Logger::cout() << "final struct initializer: " << *c << std::endl; | 388 IF_LOG Logger::cout() << "final struct initializer: " << *c << std::endl; |
389 return c; | 389 return c; |
390 } | 390 } |