[cfe-commits] r90532 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Thu Dec 3 19:07:26 PST 2009
Author: andersca
Date: Thu Dec 3 21:07:26 2009
New Revision: 90532
URL: http://llvm.org/viewvc/llvm-project?rev=90532&view=rev
Log:
Add a premature optimization.
Modified:
cfe/trunk/lib/CodeGen/CGVtable.cpp
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=90532&r1=90531&r2=90532&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Thu Dec 3 21:07:26 2009
@@ -832,6 +832,9 @@
}
void VtableBuilder::AppendMethodsToVtable() {
+ // Reserve room for our new methods.
+ methods.reserve(methods.size() + Methods.size());
+
for (unsigned i = 0, e = Methods.size(); i != e; ++i) {
GlobalDecl GD = Methods[i];
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
More information about the cfe-commits
mailing list