]> granicus.if.org Git - clang/commit
Driver: Factor string vector push_back into a helper class and optimize it.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 26 Mar 2012 15:39:31 +0000 (15:39 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 26 Mar 2012 15:39:31 +0000 (15:39 +0000)
commitdccb9bb102adf6ad89ede2f4930fb570c77243b9
treec3f6e79b5cee9311be1ac614528d1e43370bcd76
parentecafd309b3ed2ffc6f8ae7eecd1e7eae84b26f81
Driver: Factor string vector push_back into a helper class and optimize it.

Due to lack of move semantics we would create a temporary std::string from the
string literal, copy it into the vector and discard the temporary. This leads
to massive code bloat, optimizing it saves 50k on i386-linux-Release+Asserts.

While there add a two-element overload for push_back, simplifying code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153441 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/CompilerInvocation.cpp