[llvm-commits] [llvm] r74125 - in /llvm/trunk: include/llvm/Analysis/ProfileInfoLoader.h lib/Analysis/ProfileInfoLoader.cpp
Owen Anderson
resistor at mac.com
Wed Jun 24 15:09:11 PDT 2009
Author: resistor
Date: Wed Jun 24 17:08:59 2009
New Revision: 74125
URL: http://llvm.org/viewvc/llvm-project?rev=74125&view=rev
Log:
Get rid of a static boolean.
Modified:
llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h
llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp
Modified: llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h?rev=74125&r1=74124&r2=74125&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h (original)
+++ llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h Wed Jun 24 17:08:59 2009
@@ -33,6 +33,7 @@
std::vector<unsigned> BlockCounts;
std::vector<unsigned> EdgeCounts;
std::vector<unsigned> BBTrace;
+ bool Warned;
public:
// ProfileInfoLoader ctor - Read the specified profiling data file, exiting
// the program if the file is invalid or broken.
Modified: llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp?rev=74125&r1=74124&r2=74125&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp Wed Jun 24 17:08:59 2009
@@ -73,7 +73,8 @@
//
ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
const std::string &Filename,
- Module &TheModule) : M(TheModule) {
+ Module &TheModule) :
+ M(TheModule), Warned(false) {
FILE *F = fopen(Filename.c_str(), "r");
if (F == 0) {
cerr << ToolName << ": Error opening '" << Filename << "': ";
@@ -200,7 +201,6 @@
Counts.back().second += EdgeCounts[i].second;
unsigned SuccNum = EdgeCounts[i].first.second;
if (SuccNum >= TI->getNumSuccessors()) {
- static bool Warned = false;
if (!Warned) {
cerr << "WARNING: profile info doesn't seem to match"
<< " the program!\n";
More information about the llvm-commits
mailing list