diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-01-09 02:29:41 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-01-09 02:29:41 +0000 |
commit | d48cdbf0c3ee31bcac2d8304da2ee5dc16c35056 (patch) | |
tree | dcf560bf8299807196709ba4ce63e3e7d1477f01 /llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | d9bd4ae77be31aa707e91209a610a7e119362dc0 (diff) | |
download | bcm5719-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/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index a94d191285b..ed12b2e7537 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -30,7 +30,6 @@ #include "llvm/IR/InlineAsm.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Writer.h" #include "llvm/Pass.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/CommandLine.h" @@ -845,7 +844,7 @@ void ExtAddrMode::print(raw_ostream &OS) const { if (BaseGV) { OS << (NeedPlus ? " + " : "") << "GV:"; - WriteAsOperand(OS, BaseGV, /*PrintType=*/false); + BaseGV->printAsOperand(OS, /*PrintType=*/false); NeedPlus = true; } @@ -855,13 +854,13 @@ void ExtAddrMode::print(raw_ostream &OS) const { if (BaseReg) { OS << (NeedPlus ? " + " : "") << "Base:"; - WriteAsOperand(OS, BaseReg, /*PrintType=*/false); + BaseReg->printAsOperand(OS, /*PrintType=*/false); NeedPlus = true; } if (Scale) { OS << (NeedPlus ? " + " : "") << Scale << "*"; - WriteAsOperand(OS, ScaledReg, /*PrintType=*/false); + ScaledReg->printAsOperand(OS, /*PrintType=*/false); } OS << ']'; |