Mercurial > projects > ldc
comparison ir/irstruct.cpp @ 1534:8ca25bd765a3
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.
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Mon, 13 Jul 2009 12:17:58 +0200 |
parents | ad7f2f1862d6 |
children | 61f12f4651b5 |
comparison
equal
deleted
inserted
replaced
1533:d1652c8fb4f6 | 1534:8ca25bd765a3 |
---|---|
115 size_t n = constants.size(); | 115 size_t n = constants.size(); |
116 while (diff) | 116 while (diff) |
117 { | 117 { |
118 if (global.params.is64bit && diff % 8 == 0) | 118 if (global.params.is64bit && diff % 8 == 0) |
119 { | 119 { |
120 constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int64Ty)); | 120 constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int64Ty)); |
121 diff -= 8; | 121 diff -= 8; |
122 } | 122 } |
123 else if (diff % 4 == 0) | 123 else if (diff % 4 == 0) |
124 { | 124 { |
125 constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int32Ty)); | 125 constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int32Ty)); |
126 diff -= 4; | 126 diff -= 4; |
127 } | 127 } |
128 else if (diff % 2 == 0) | 128 else if (diff % 2 == 0) |
129 { | 129 { |
130 constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int16Ty)); | 130 constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int16Ty)); |
131 diff -= 2; | 131 diff -= 2; |
132 } | 132 } |
133 else | 133 else |
134 { | 134 { |
135 constants.push_back(llvm::Constant::getNullValue(llvm::Type::Int8Ty)); | 135 constants.push_back(llvm::getGlobalContext().getNullValue(llvm::Type::Int8Ty)); |
136 diff -= 1; | 136 diff -= 1; |
137 } | 137 } |
138 } | 138 } |
139 return constants.size() - n; | 139 return constants.size() - n; |
140 } | 140 } |