Build fix for the latest LLVMContext changes (LLVM r75445)

This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
This commit is contained in:
Benjamin Kramer
2009-07-13 12:17:58 +02:00
parent 8576788245
commit 331319dab1
16 changed files with 36 additions and 38 deletions

View File

@@ -117,22 +117,22 @@ size_t add_zeros(std::vector<llvm::Constant*>& constants, size_t diff)
{
if (global.params.is64bit && diff % 8 == 0)
{
constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int64Ty));
constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int64Ty));
diff -= 8;
}
else if (diff % 4 == 0)
{
constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int32Ty));
constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int32Ty));
diff -= 4;
}
else if (diff % 2 == 0)
{
constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int16Ty));
constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int16Ty));
diff -= 2;
}
else
{
constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int8Ty));
constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int8Ty));
diff -= 1;
}
}