summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 04:52:46 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 04:52:46 +0000
commit79c5d3f9717756dc3ff56cfcaa3ae1a5930c457a (patch)
tree507e7ca43cdca884242d2bb314ed04ec8a17d52c /lib
parent0c47a412079c11656fdcc7e125d604e3aa543903 (diff)
downloadllvm-79c5d3f9717756dc3ff56cfcaa3ae1a5930c457a.tar.gz
llvm-79c5d3f9717756dc3ff56cfcaa3ae1a5930c457a.tar.bz2
llvm-79c5d3f9717756dc3ff56cfcaa3ae1a5930c457a.tar.xz
remove the std::ostream version of module and type printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp4
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp8
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp6
-rw-r--r--lib/VMCore/AsmWriter.cpp9
-rw-r--r--lib/VMCore/Type.cpp13
5 files changed, 9 insertions, 31 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index a20122d9f9..644740f71a 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -814,7 +814,7 @@ void ExecutionEngine::StoreValueToMemory(const GenericValue &Val,
*((PointerTy*)Ptr) = Val.PointerVal;
break;
default:
- cerr << "Cannot store value of type " << *Ty << "!\n";
+ errs() << "Cannot store value of type " << *Ty << "!\n";
}
if (sys::isLittleEndianHost() != getTargetData()->isLittleEndian())
@@ -930,7 +930,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
return;
}
- cerr << "Bad Type: " << *Init->getType() << "\n";
+ errs() << "Bad Type: " << *Init->getType() << "\n";
llvm_unreachable("Unknown constant type to initialize memory with!");
}
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 31210a7eab..bb45b2c441 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -737,9 +737,9 @@ void Interpreter::visitAllocationInst(AllocationInst &I) {
// Allocate enough memory to hold the type...
void *Memory = malloc(MemToAlloc);
- DOUT << "Allocated Type: " << *Ty << " (" << TypeSize << " bytes) x "
- << NumElements << " (Total: " << MemToAlloc << ") at "
- << uintptr_t(Memory) << '\n';
+ DEBUG(errs() << "Allocated Type: " << *Ty << " (" << TypeSize << " bytes) x "
+ << NumElements << " (Total: " << MemToAlloc << ") at "
+ << uintptr_t(Memory) << '\n');
GenericValue Result = PTOGV(Memory);
assert(Result.PointerVal != 0 && "Null pointer returned by malloc!");
@@ -795,7 +795,7 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I,
GenericValue Result;
Result.PointerVal = ((char*)getOperandValue(Ptr, SF).PointerVal) + Total;
- DOUT << "GEP Index " << Total << " bytes.\n";
+ DEBUG(errs() << "GEP Index " << Total << " bytes.\n");
return Result;
}
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index f6e11bc646..9ef4ea8ffe 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -62,11 +62,11 @@ namespace {
///
static void PrintOps(Instruction *I, const std::vector<ValueEntry> &Ops) {
Module *M = I->getParent()->getParent()->getParent();
- cerr << Instruction::getOpcodeName(I->getOpcode()) << " "
+ errs() << Instruction::getOpcodeName(I->getOpcode()) << " "
<< *Ops[0].Op->getType();
for (unsigned i = 0, e = Ops.size(); i != e; ++i) {
- WriteAsOperand(*cerr.stream() << " ", Ops[i].Op, false, M);
- cerr << "," << Ops[i].Rank;
+ WriteAsOperand(errs() << " ", Ops[i].Op, false, M);
+ errs() << "," << Ops[i].Rank;
}
}
#endif
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 696cd6f5c4..dc72031482 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1999,10 +1999,6 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
// External Interface declarations
//===----------------------------------------------------------------------===//
-void Module::print(std::ostream &o, AssemblyAnnotationWriter *AAW) const {
- raw_os_ostream OS(o);
- print(OS, AAW);
-}
void Module::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
SlotTracker SlotTable(this);
formatted_raw_ostream OS(ROS);
@@ -2010,11 +2006,6 @@ void Module::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
W.write(this);
}
-void Type::print(std::ostream &o) const {
- raw_os_ostream OS(o);
- print(OS);
-}
-
void Type::print(raw_ostream &OS) const {
if (this == 0) {
OS << "<null Type>";
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 3f64e81f92..36dcbccdce 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -1208,19 +1208,6 @@ bool SequentialType::indexValid(const Value *V) const {
}
namespace llvm {
-std::ostream &operator<<(std::ostream &OS, const Type *T) {
- if (T == 0)
- OS << "<null> value!\n";
- else
- T->print(OS);
- return OS;
-}
-
-std::ostream &operator<<(std::ostream &OS, const Type &T) {
- T.print(OS);
- return OS;
-}
-
raw_ostream &operator<<(raw_ostream &OS, const Type &T) {
T.print(OS);
return OS;