]> granicus.if.org Git - clang/commit
[Basic] Fix up DiagnosticBuilder::{FlushCounts,Emit} to be inline.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 13 Mar 2012 21:02:14 +0000 (21:02 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 13 Mar 2012 21:02:14 +0000 (21:02 +0000)
commit3054f097f813d19090bdb23645dcd48df71d1a89
treefbb602c2a8d8ea082c0054936f86503ae3e0732b
parent4b1f684416980ef6f1a7cb9e6af9c4fa4a164617
[Basic] Fix up DiagnosticBuilder::{FlushCounts,Emit} to be inline.

 - This is much more important than it appears at first glance...

The intended design of DiagnosticBuilder was that it never escape and that all
its members would get lowered to registers by the compiler. By fixing Emit here,
the compiler can completely eliminate the DiagnosticBuilder object and never
need to push those registers back into it.

Unfortunately, Sema has broken DiagnosticBuilder in other ways (by introducing
SemaDiagnosticBuilder), so we don't get the fill impact of this, but it is still
good for 30k reduction in code size. I'll work on fixing the
SemaDiagnosticBuilder problems next.

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