Statistic API change

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Statistic API change

Chris Lattner

FYI.  I just changed how statistics are defined.  This eliminates one
static constructor for each statistic in the system, causing them to be
statically initalized instead.  To update any out of tree code, change

Statistic foo("blah", "desc");


#define DEBUG_TYPE "blah"   // before any #includes
STATISTIC(foo, "desc");

Statistics are now implicitly declared static, so they can be moved out of
anonymous namespaces and don't need explicit static qualifiers.

Lemme know if there are any questions.  I will most likely be making
similar changes for pass registration and command line options in the
near future.


LLVM Developers mailing list
[hidden email]