summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Statistic.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-19 23:17:40 +0000
committerChris Lattner <sabre@nondot.org>2006-12-19 23:17:40 +0000
commit00bb216977a4a1a4db60b30263fe9b19fa7fa0d7 (patch)
treeb230f2049feae29cec56a1da6fa754b49eb32437 /llvm/lib/Support/Statistic.cpp
parent575d3218abacb04445500f66a7b3901a5326c8de (diff)
downloadbcm5719-llvm-00bb216977a4a1a4db60b30263fe9b19fa7fa0d7.tar.gz
bcm5719-llvm-00bb216977a4a1a4db60b30263fe9b19fa7fa0d7.zip
eliminate constructor from Statistic class. It is now impossible to get a
static constructor for them :). Transition complete. llvm-svn: 32710
Diffstat (limited to 'llvm/lib/Support/Statistic.cpp')
-rw-r--r--llvm/lib/Support/Statistic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/Statistic.cpp b/llvm/lib/Support/Statistic.cpp
index 8fdd44aace1..a698a004a8e 100644
--- a/llvm/lib/Support/Statistic.cpp
+++ b/llvm/lib/Support/Statistic.cpp
@@ -45,11 +45,11 @@ namespace {
/// on demand (when the first statistic is bumped) and destroyed only when
/// llvm_shutdown is called. We print statistics from the destructor.
class StatisticInfo {
- std::vector<const StatisticBase*> Stats;
+ std::vector<const Statistic*> Stats;
public:
~StatisticInfo();
- void addStatistic(const StatisticBase *S) {
+ void addStatistic(const Statistic *S) {
Stats.push_back(S);
}
};
@@ -60,7 +60,7 @@ static ManagedStatic<StatisticInfo> StatInfo;
/// RegisterStatistic - The first time a statistic is bumped, this method is
/// called.
-void StatisticBase::RegisterStatistic() {
+void Statistic::RegisterStatistic() {
// If stats are enabled, inform StatInfo that this statistic should be
// printed.
if (Enabled)
@@ -70,7 +70,7 @@ void StatisticBase::RegisterStatistic() {
}
struct NameCompare {
- bool operator()(const StatisticBase *LHS, const StatisticBase *RHS) const {
+ bool operator()(const Statistic *LHS, const Statistic *RHS) const {
int Cmp = std::strcmp(LHS->getName(), RHS->getName());
if (Cmp != 0) return Cmp < 0;
OpenPOWER on IntegriCloud