DOUT is deprecated, use DEBUG(errs()) instead

This commit is contained in:
Benjamin Kramer
2009-07-27 11:44:01 +02:00
parent 3cf7b6a95c
commit 27a9f93767
4 changed files with 24 additions and 20 deletions

View File

@@ -24,6 +24,7 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
STATISTIC(NumFunctions, "Number of function bodies removed");
@@ -55,14 +56,14 @@ bool StripExternals::runOnModule(Module &M) {
Changed = true;
++NumFunctions;
if (I->use_empty()) {
DOUT << "Deleting function: " << *I;
DEBUG(errs() << "Deleting function: " << *I);
Module::iterator todelete = I;
++I;
todelete->eraseFromParent();
continue;
} else {
I->deleteBody();
DOUT << "Deleted function body: " << *I;
DEBUG(errs() << "Deleted function body: " << *I);
}
}
++I;
@@ -75,7 +76,7 @@ bool StripExternals::runOnModule(Module &M) {
Changed = true;
++NumVariables;
if (I->use_empty()) {
DOUT << "Deleting global: " << *I;
DEBUG(errs() << "Deleting global: " << *I);
Module::global_iterator todelete = I;
++I;
todelete->eraseFromParent();
@@ -83,7 +84,7 @@ bool StripExternals::runOnModule(Module &M) {
} else {
I->setInitializer(0);
I->setLinkage(GlobalValue::ExternalLinkage);
DOUT << "Deleted initializer: " << *I;
DEBUG(errs() << "Deleted initializer: " << *I);
}
}
++I;