More changes to std::vector usage.

Replace with std::vector with static array, llvm::SmallVector or
add code to reserve space.
This commit is contained in:
kai
2013-03-17 22:05:04 +01:00
parent bc09ceae18
commit 7d65a311b1
9 changed files with 70 additions and 76 deletions

View File

@@ -172,10 +172,11 @@ static LLFunction* build_module_reference_and_ctor(LLConstant* moduleinfo)
// provide the default initializer
LLStructType* modulerefTy = DtoModuleReferenceType();
std::vector<LLConstant*> mrefvalues;
mrefvalues.push_back(LLConstant::getNullValue(modulerefTy->getContainedType(0)));
mrefvalues.push_back(llvm::ConstantExpr::getBitCast(moduleinfo, modulerefTy->getContainedType(1)));
LLConstant* thismrefinit = LLConstantStruct::get(modulerefTy, mrefvalues);
LLConstant* mrefvalues[] = {
LLConstant::getNullValue(modulerefTy->getContainedType(0)),
llvm::ConstantExpr::getBitCast(moduleinfo, modulerefTy->getContainedType(1))
};
LLConstant* thismrefinit = LLConstantStruct::get(modulerefTy, llvm::ArrayRef<LLConstant*>(mrefvalues));
// create the ModuleReference node for this module
std::string thismrefname = "_D";