[cfe-commits] r146959 - in /cfe/trunk: include/clang/AST/ include/clang/Analysis/Analyses/ include/clang/Basic/ include/clang/CodeGen/ include/clang/Driver/ include/clang/Frontend/ include/clang/Lex/ include/clang/Sema/ include/clang/StaticAnalyz
dblaikie at gmail.com
Tue Jan 10 00:04:27 PST 2012
On Wed, Dec 21, 2011 at 8:07 PM, Chris Lattner <clattner at apple.com> wrote:
> On Dec 20, 2011, at 9:34 AM, Ted Kremenek wrote:
>> On Dec 20, 2011, at 12:54 AM, Chris Lattner <clattner at apple.com> wrote:
>>> If there is a simple virtual method that can be moved out of line without impacting performance, then that is clearly preferable to adding an explicit anchor method.
>> Can you elaborate on the "without impacting performance" part? What is your specific concern?
> My concern is specific to virtual destructors. Virtual methods don't (in general) get inlined, so moving them out of line doesn't cause a problem (though it can make it harder to understand a class).
> Moving a virtual dtor out of line can prevent it from being inlined into its subclasses dtors.
Ah, that makes sense.
Any further thoughts on this? I don't want to leave the codebase in a
less-than-desirable state if there's something better I could do to
tidy this up.
In some cases I could take non-destructors & use those as vtable pins, perhaps?
More information about the cfe-commits