]> granicus.if.org Git - clang/commit
[Basic] Stop using a SmallVector<> for Diagnostic. This drops Clang binary size
authorDaniel Dunbar <daniel@zuster.org>
Tue, 13 Mar 2012 18:21:17 +0000 (18:21 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 13 Mar 2012 18:21:17 +0000 (18:21 +0000)
commit981e279b95f3a71e2268124b1abaae050ec200dc
treef1e144f970e532abf3caa901ab65384fbe3c61b4
parentbea6c0a2e77a78e3d27ee44461613acdd1d8ee9c
[Basic] Stop using a SmallVector<> for Diagnostic. This drops Clang binary size
by ~%.3/~100k in my build -- simply by eliminating the horrible code bloat coming
from the .clear() of the SmallVector<FixItHint>, which does a std::~string, etc.
 - My understanding is we don't ever emit arbitrary numbers of fixits, so I just
   moved us to using a statically sized array like we do for arguments and
   ranges.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152639 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Diagnostic.h
lib/Basic/Diagnostic.cpp