Mercurial > projects > ldc
comparison ir/irclass.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 | 8d086d552909 |
children |
comparison
equal
deleted
inserted
replaced
1649:36da40ecbbe0 | 1650:40bd4a0d4870 |
---|---|
119 std::string name("_D"); | 119 std::string name("_D"); |
120 name.append(cd->mangle()); | 120 name.append(cd->mangle()); |
121 name.append("16__interfaceInfosZ"); | 121 name.append("16__interfaceInfosZ"); |
122 | 122 |
123 llvm::GlobalValue::LinkageTypes _linkage = DtoExternalLinkage(aggrdecl); | 123 llvm::GlobalValue::LinkageTypes _linkage = DtoExternalLinkage(aggrdecl); |
124 classInterfacesArray = new llvm::GlobalVariable(*gIR->module, | 124 classInterfacesArray = new llvm::GlobalVariable(*gIR->module, |
125 array_type, true, _linkage, NULL, name); | 125 array_type, true, _linkage, NULL, name); |
126 | 126 |
127 return classInterfacesArray; | 127 return classInterfacesArray; |
128 } | 128 } |
129 | 129 |
394 mangle.append("11__interface"); | 394 mangle.append("11__interface"); |
395 mangle.append(b->base->mangle()); | 395 mangle.append(b->base->mangle()); |
396 mangle.append("6__vtblZ"); | 396 mangle.append("6__vtblZ"); |
397 | 397 |
398 llvm::GlobalVariable* GV = new llvm::GlobalVariable( | 398 llvm::GlobalVariable* GV = new llvm::GlobalVariable( |
399 *gIR->module, | 399 *gIR->module, |
400 vtbl_constant->getType(), | 400 vtbl_constant->getType(), |
401 true, | 401 true, |
402 _linkage, | 402 _linkage, |
403 vtbl_constant, | 403 vtbl_constant, |
404 mangle | 404 mangle |
481 // offset | 481 // offset |
482 LLConstant* off = DtoConstSize_t(it->offset); | 482 LLConstant* off = DtoConstSize_t(it->offset); |
483 | 483 |
484 // create Interface struct | 484 // create Interface struct |
485 LLConstant* inits[3] = { ci, vtb, off }; | 485 LLConstant* inits[3] = { ci, vtb, off }; |
486 LLConstant* entry = LLConstantStruct::get(gIR->context(), inits, 3); | 486 LLConstant* entry = LLConstantStruct::get(gIR->context(), inits, 3, false); |
487 constants.push_back(entry); | 487 constants.push_back(entry); |
488 } | 488 } |
489 | 489 |
490 // create Interface[N] | 490 // create Interface[N] |
491 const llvm::ArrayType* array_type = llvm::ArrayType::get( | 491 const llvm::ArrayType* array_type = llvm::ArrayType::get( |