summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/Sink.cpp
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/lib/Transforms/Scalar/Sink.cpp
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/lib/Transforms/Scalar/Sink.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Sink.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/Sink.cpp b/llvm/lib/Transforms/Scalar/Sink.cpp
index cf8e5b75ab4..a5096da46a0 100644
--- a/llvm/lib/Transforms/Scalar/Sink.cpp
+++ b/llvm/lib/Transforms/Scalar/Sink.cpp
@@ -20,7 +20,6 @@
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/IntrinsicInst.h"
-#include "llvm/IR/Writer.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@@ -259,9 +258,9 @@ bool Sinking::SinkInstruction(Instruction *Inst,
return false;
DEBUG(dbgs() << "Sink" << *Inst << " (";
- WriteAsOperand(dbgs(), Inst->getParent(), false);
+ Inst->getParent()->printAsOperand(dbgs(), false);
dbgs() << " -> ";
- WriteAsOperand(dbgs(), SuccToSinkTo, false);
+ SuccToSinkTo->printAsOperand(dbgs(), false);
dbgs() << ")\n");
// Move the instruction.
OpenPOWER on IntegriCloud