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
this:

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

into:

#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.

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev