comparison gen/arrays.cpp @ 1650:40bd4a0d4870

Update to work with LLVM 2.7. Removed use of dyn_cast, llvm no compiles without exceptions and rtti by default. We do need exceptions for the libconfig stuff, but rtti isn't necessary (anymore). Debug info needs to be rewritten, as in LLVM 2.7 the format has completely changed. To have something to look at while rewriting, the old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means that you have to define this to compile at the moment. Updated tango 0.99.9 patch to include updated EH runtime code, which is needed for LLVM 2.7 as well.
author Tomas Lindquist Olsen
date Wed, 19 May 2010 12:42:32 +0200
parents 8f121883bce8
children
comparison
equal deleted inserted replaced
1649:36da40ecbbe0 1650:40bd4a0d4870
307 mismatch = true; 307 mismatch = true;
308 } 308 }
309 309
310 LLConstant* constarr; 310 LLConstant* constarr;
311 if (mismatch) 311 if (mismatch)
312 constarr = LLConstantStruct::get(gIR->context(), initvals); 312 constarr = LLConstantStruct::get(gIR->context(), initvals, false); // FIXME should this pack?
313 else 313 else
314 constarr = LLConstantArray::get(LLArrayType::get(llelemty, arrlen), initvals); 314 constarr = LLConstantArray::get(LLArrayType::get(llelemty, arrlen), initvals);
315 315
316 // std::cout << "constarr: " << *constarr << std::endl; 316 // std::cout << "constarr: " << *constarr << std::endl;
317 317
392 392
393 ////////////////////////////////////////////////////////////////////////////////////////// 393 //////////////////////////////////////////////////////////////////////////////////////////
394 LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr) 394 LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr)
395 { 395 {
396 LLConstant* values[2] = { dim, ptr }; 396 LLConstant* values[2] = { dim, ptr };
397 return LLConstantStruct::get(gIR->context(), values, 2); 397 return LLConstantStruct::get(gIR->context(), values, 2, false);
398 } 398 }
399 399
400 ////////////////////////////////////////////////////////////////////////////////////////// 400 //////////////////////////////////////////////////////////////////////////////////////////
401 static bool isInitialized(Type* et) { 401 static bool isInitialized(Type* et) {
402 // Strip static array types from element type 402 // Strip static array types from element type