[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/StaticAnalyzer/Core/ include/clang/StaticAnalyzer/Core/BugReporter/ include/clang/StaticAnalyzer/Core/PathSensitive/ lib/AST/ lib/Analysis/ lib/Basic/ lib/CodeGen/ lib/Driver/ lib/Frontend/ lib/Lex/ lib/Parse/ lib/Sema/ lib/StaticAnalyzer/Core/ utils/TableGen/

Chris Lattner clattner at apple.com
Wed Dec 21 20:07:06 PST 2011


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.

-Chris



More information about the cfe-commits mailing list