Support: Add llvm::AreStatisticsEnabled().

llvm-svn: 126558
This commit is contained in:
Daniel Dunbar 2011-02-26 23:17:12 +00:00
parent 412ffed4f0
commit d4a7704765
2 changed files with 7 additions and 0 deletions

View File

@ -121,6 +121,9 @@ protected:
/// \brief Enable the collection and printing of statistics.
void EnableStatistics();
/// \brief Check if statistics are enabled.
bool AreStatisticsEnabled();
/// \brief Print statistics to the file returned by CreateInfoOutputFile().
void PrintStatistics();

View File

@ -101,6 +101,10 @@ void llvm::EnableStatistics() {
Enabled.setValue(true);
}
bool llvm::AreStatisticsEnabled() {
return Enabled;
}
void llvm::PrintStatistics(raw_ostream &OS) {
StatisticInfo &Stats = *StatInfo;