mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-13 21:05:16 +00:00
Get rid of a static boolean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2e1af3529b
commit
09fc0fa0b1
@ -33,6 +33,7 @@ class ProfileInfoLoader {
|
|||||||
std::vector<unsigned> BlockCounts;
|
std::vector<unsigned> BlockCounts;
|
||||||
std::vector<unsigned> EdgeCounts;
|
std::vector<unsigned> EdgeCounts;
|
||||||
std::vector<unsigned> BBTrace;
|
std::vector<unsigned> BBTrace;
|
||||||
|
bool Warned;
|
||||||
public:
|
public:
|
||||||
// ProfileInfoLoader ctor - Read the specified profiling data file, exiting
|
// ProfileInfoLoader ctor - Read the specified profiling data file, exiting
|
||||||
// the program if the file is invalid or broken.
|
// the program if the file is invalid or broken.
|
||||||
|
@ -73,7 +73,8 @@ static void ReadProfilingBlock(const char *ToolName, FILE *F,
|
|||||||
//
|
//
|
||||||
ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
|
ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
|
||||||
const std::string &Filename,
|
const std::string &Filename,
|
||||||
Module &TheModule) : M(TheModule) {
|
Module &TheModule) :
|
||||||
|
M(TheModule), Warned(false) {
|
||||||
FILE *F = fopen(Filename.c_str(), "r");
|
FILE *F = fopen(Filename.c_str(), "r");
|
||||||
if (F == 0) {
|
if (F == 0) {
|
||||||
cerr << ToolName << ": Error opening '" << Filename << "': ";
|
cerr << ToolName << ": Error opening '" << Filename << "': ";
|
||||||
@ -200,7 +201,6 @@ void ProfileInfoLoader::getBlockCounts(std::vector<std::pair<BasicBlock*,
|
|||||||
Counts.back().second += EdgeCounts[i].second;
|
Counts.back().second += EdgeCounts[i].second;
|
||||||
unsigned SuccNum = EdgeCounts[i].first.second;
|
unsigned SuccNum = EdgeCounts[i].first.second;
|
||||||
if (SuccNum >= TI->getNumSuccessors()) {
|
if (SuccNum >= TI->getNumSuccessors()) {
|
||||||
static bool Warned = false;
|
|
||||||
if (!Warned) {
|
if (!Warned) {
|
||||||
cerr << "WARNING: profile info doesn't seem to match"
|
cerr << "WARNING: profile info doesn't seem to match"
|
||||||
<< " the program!\n";
|
<< " the program!\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user