summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-09 02:29:41 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-09 02:29:41 +0000
commitd48cdbf0c3ee31bcac2d8304da2ee5dc16c35056 (patch)
treedcf560bf8299807196709ba4ce63e3e7d1477f01 /llvm/tools/bugpoint
parentd9bd4ae77be31aa707e91209a610a7e119362dc0 (diff)
downloadbcm5719-llvm-d48cdbf0c3ee31bcac2d8304da2ee5dc16c35056.tar.gz
bcm5719-llvm-d48cdbf0c3ee31bcac2d8304da2ee5dc16c35056.zip
Put the functionality for printing a value to a raw_ostream as an
operand into the Value interface just like the core print method is. That gives a more conistent organization to the IR printing interfaces -- they are all attached to the IR objects themselves. Also, update all the users. This removes the 'Writer.h' header which contained only a single function declaration. llvm-svn: 198836
Diffstat (limited to 'llvm/tools/bugpoint')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index fb2edf68447..369c904709a 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -19,7 +19,6 @@
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
-#include "llvm/IR/Writer.h"
#include "llvm/Pass.h"
#include "llvm/PassManager.h"
#include "llvm/Support/CommandLine.h"
@@ -309,7 +308,7 @@ llvm::SplitFunctionsOutOfModule(Module *M,
for (unsigned i = 0, e = F.size(); i != e; ++i) {
Function *TNOF = cast<Function>(VMap[F[i]]);
DEBUG(errs() << "Removing function ");
- DEBUG(WriteAsOperand(errs(), TNOF, false));
+ DEBUG(TNOF->printAsOperand(errs(), false));
DEBUG(errs() << "\n");
TestFunctions.insert(cast<Function>(NewVMap[TNOF]));
DeleteFunctionBody(TNOF); // Function is now external in this module!
@@ -330,7 +329,7 @@ llvm::SplitFunctionsOutOfModule(Module *M,
if (Function *SafeFn = globalInitUsesExternalBA(GV)) {
errs() << "*** Error: when reducing functions, encountered "
"the global '";
- WriteAsOperand(errs(), GV, false);
+ GV->printAsOperand(errs(), false);
errs() << "' with an initializer that references blockaddresses "
"from safe function '" << SafeFn->getName()
<< "' and from test function '" << TestFn->getName() << "'.\n";
OpenPOWER on IntegriCloud