Mercurial > projects > ldc
diff ir/irstruct.cpp @ 1571:8d086d552909
IntegerType is now contextifed.
Requires llvm >= 78969. resistor says this will be the last context API change :)
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Fri, 14 Aug 2009 00:39:18 +0200 |
parents | 755abafbf25d |
children |
line wrap: on
line diff
--- a/ir/irstruct.cpp Thu Aug 06 16:02:14 2009 +0200 +++ b/ir/irstruct.cpp Fri Aug 14 00:39:18 2009 +0200 @@ -20,7 +20,7 @@ IrStruct::IrStruct(AggregateDeclaration* aggr) : diCompositeType(NULL), - init_pa(llvm::OpaqueType::get()) + init_pa(llvm::OpaqueType::get(gIR->context())) { aggrdecl = aggr; @@ -117,22 +117,22 @@ { if (global.params.is64bit && diff % 8 == 0) { - constants.push_back(LLConstant::getNullValue(llvm::Type::Int64Ty)); + constants.push_back(LLConstant::getNullValue(llvm::Type::getInt64Ty(gIR->context()))); diff -= 8; } else if (diff % 4 == 0) { - constants.push_back(LLConstant::getNullValue(llvm::Type::Int32Ty)); + constants.push_back(LLConstant::getNullValue(llvm::Type::getInt32Ty(gIR->context()))); diff -= 4; } else if (diff % 2 == 0) { - constants.push_back(LLConstant::getNullValue(llvm::Type::Int16Ty)); + constants.push_back(LLConstant::getNullValue(llvm::Type::getInt16Ty(gIR->context()))); diff -= 2; } else { - constants.push_back(LLConstant::getNullValue(llvm::Type::Int8Ty)); + constants.push_back(LLConstant::getNullValue(llvm::Type::getInt8Ty(gIR->context()))); diff -= 1; } }