Replace SmallVector/vector with C array for type lists

This commit is contained in:
kai
2013-02-02 13:48:23 +01:00
parent 26e6503258
commit 045d50deb5
3 changed files with 11 additions and 20 deletions

View File

@@ -72,10 +72,9 @@ IrTypeDelegate* IrTypeDelegate::get(Type* dt)
"picked up random pre-existing type?"
);
llvm::SmallVector<LLType*, 2> types;
types.push_back(getVoidPtrType());
types.push_back(getPtrToType(dt->nextOf()->irtype->getLLType()));
LLStructType* lt = LLStructType::get(gIR->context(), types);
llvm::Type *types[] = { getVoidPtrType(),
getPtrToType(dt->nextOf()->irtype->getLLType()) };
LLStructType* lt = LLStructType::get(gIR->context(), types, false);
dt->irtype = new IrTypeDelegate(dt, lt);
}