patch: remove entries from UndefinedInternals as functions are defined

Nick Lewycky nlewycky at google.com
Tue Jan 29 04:04:02 PST 2013


Currently UndefinedInternals grows an entry each time an internal function
is ODR-used before it is defined, and this mapping is filtered only when
diagnostics are emitted.

This patch shrinks that list by removing entries as functions are defined.
Because that's a performance sensitive path, we test to see whether there
even is a previous function declaration, and if so that it was ODR-used,
before doing the lookup that would remove the entry. Secondly, this patch
applies the same filtering used when emitting diagnostics to emitting PCH.

A large chunk of this patch is reverting the switch to MapVector in
r173538, as MapVector does not (and can not) support efficient removals.

Please review!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130129/285074c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: undefined-internal-erase-on-define-1.patch
Type: application/octet-stream
Size: 9533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130129/285074c7/attachment.obj>


More information about the cfe-commits mailing list