Mercurial > projects > ldc
diff gen/structs.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/gen/structs.cpp Thu Aug 06 16:02:14 2009 +0200 +++ b/gen/structs.cpp Fri Aug 14 00:39:18 2009 +0200 @@ -162,22 +162,22 @@ { if (is64 && diff % 8 == 0) { - values.push_back(LLConstant::getNullValue(llvm::Type::Int64Ty)); + values.push_back(LLConstant::getNullValue(llvm::Type::getInt64Ty(gIR->context()))); diff -= 8; } else if (diff % 4 == 0) { - values.push_back(LLConstant::getNullValue(llvm::Type::Int32Ty)); + values.push_back(LLConstant::getNullValue(llvm::Type::getInt32Ty(gIR->context()))); diff -= 4; } else if (diff % 2 == 0) { - values.push_back(LLConstant::getNullValue(llvm::Type::Int16Ty)); + values.push_back(LLConstant::getNullValue(llvm::Type::getInt16Ty(gIR->context()))); diff -= 2; } else { - values.push_back(LLConstant::getNullValue(llvm::Type::Int8Ty)); + values.push_back(LLConstant::getNullValue(llvm::Type::getInt8Ty(gIR->context()))); diff -= 1; } }