diff options
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenInstruction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp index 366e8ec7fac..bd26beb3567 100644 --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -49,7 +49,9 @@ CGIOperandList::CGIOperandList(Record *R) : TheDef(R) { unsigned MIOperandNo = 0; std::set<std::string> OperandNames; - for (unsigned i = 0, e = InDI->getNumArgs()+OutDI->getNumArgs(); i != e; ++i){ + unsigned e = InDI->getNumArgs() + OutDI->getNumArgs(); + OperandList.reserve(e); + for (unsigned i = 0; i != e; ++i){ Init *ArgInit; std::string ArgName; if (i < NumDefs) { |