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

@@ -165,8 +165,10 @@ void RTTIBuilder::finalize(LLType* type, LLValue* value)
// set struct body
if (st->isOpaque()) {
const int n = inits.size();
std::vector<LLType*> types;
for (int i = 0, n = inits.size(); i < n; ++i)
types.reserve(n);
for (int i = 0; i < n; ++i)
types.push_back(inits[i]->getType());
st->setBody(types);
}