diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/Scalar/Reassociate.cpp | 6 | ||||
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 9 | ||||
-rw-r--r-- | lib/VMCore/Type.cpp | 13 |
5 files changed, 9 insertions, 31 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index a20122d..644740f 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 31210a7..bb45b2c 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 f6e11bc..9ef4ea8 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 696cd6f..dc72031 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 3f64e81..36dcbcc 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; |