aboutsummaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/CBackend/CBackend.cpp14
-rw-r--r--lib/Target/MSIL/MSILWriter.cpp18
2 files changed, 16 insertions, 16 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 8099bb3e3b..6fea22f14d 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -319,7 +319,7 @@ namespace {
void visitInstruction(Instruction &I) {
#ifndef NDEBUG
- cerr << "C Writer does not know about " << I;
+ errs() << "C Writer does not know about " << I;
#endif
llvm_unreachable(0);
}
@@ -506,7 +506,7 @@ CWriter::printSimpleType(formatted_raw_ostream &Out, const Type *Ty,
default:
#ifndef NDEBUG
- cerr << "Unknown primitive type: " << *Ty << "\n";
+ errs() << "Unknown primitive type: " << *Ty << "\n";
#endif
llvm_unreachable(0);
}
@@ -553,7 +553,7 @@ CWriter::printSimpleType(std::ostream &Out, const Type *Ty, bool isSigned,
default:
#ifndef NDEBUG
- cerr << "Unknown primitive type: " << *Ty << "\n";
+ errs() << "Unknown primitive type: " << *Ty << "\n";
#endif
llvm_unreachable(0);
}
@@ -1110,7 +1110,7 @@ void CWriter::printConstant(Constant *CPV, bool Static) {
}
default:
#ifndef NDEBUG
- cerr << "CWriter Error: Unhandled constant expression: "
+ errs() << "CWriter Error: Unhandled constant expression: "
<< *CE << "\n";
#endif
llvm_unreachable(0);
@@ -1323,7 +1323,7 @@ void CWriter::printConstant(Constant *CPV, bool Static) {
// FALL THROUGH
default:
#ifndef NDEBUG
- cerr << "Unknown constant type: " << *CPV << "\n";
+ errs() << "Unknown constant type: " << *CPV << "\n";
#endif
llvm_unreachable(0);
}
@@ -2735,7 +2735,7 @@ void CWriter::visitBinaryOperator(Instruction &I) {
case Instruction::AShr: Out << " >> "; break;
default:
#ifndef NDEBUG
- cerr << "Invalid operator type!" << I;
+ errs() << "Invalid operator type!" << I;
#endif
llvm_unreachable(0);
}
@@ -2776,7 +2776,7 @@ void CWriter::visitICmpInst(ICmpInst &I) {
case ICmpInst::ICMP_SGT: Out << " > "; break;
default:
#ifndef NDEBUG
- cerr << "Invalid icmp predicate!" << I;
+ errs() << "Invalid icmp predicate!" << I;
#endif
llvm_unreachable(0);
}
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp
index 93e59f71d4..0a837798f6 100644
--- a/lib/Target/MSIL/MSILWriter.cpp
+++ b/lib/Target/MSIL/MSILWriter.cpp
@@ -281,7 +281,7 @@ std::string MSILWriter::getConvModopt(unsigned CallingConvID) {
case CallingConv::X86_StdCall:
return "modopt([mscorlib]System.Runtime.CompilerServices.CallConvStdcall) ";
default:
- cerr << "CallingConvID = " << CallingConvID << '\n';
+ errs() << "CallingConvID = " << CallingConvID << '\n';
llvm_unreachable("Unsupported calling convention");
}
return ""; // Not reached
@@ -327,7 +327,7 @@ std::string MSILWriter::getPrimitiveTypeName(const Type* Ty, bool isSigned) {
case Type::DoubleTyID:
return "float64 ";
default:
- cerr << "Type = " << *Ty << '\n';
+ errs() << "Type = " << *Ty << '\n';
llvm_unreachable("Invalid primitive type");
}
return ""; // Not reached
@@ -355,7 +355,7 @@ std::string MSILWriter::getTypeName(const Type* Ty, bool isSigned,
return getArrayTypeName(Ty->getTypeID(),Ty);
return "valuetype '"+getArrayTypeName(Ty->getTypeID(),Ty)+"' ";
default:
- cerr << "Type = " << *Ty << '\n';
+ errs() << "Type = " << *Ty << '\n';
llvm_unreachable("Invalid type in getTypeName()");
}
return ""; // Not reached
@@ -399,7 +399,7 @@ std::string MSILWriter::getTypePostfix(const Type* Ty, bool Expand,
case Type::PointerTyID:
return "i"+utostr(TD->getTypeAllocSize(Ty));
default:
- cerr << "TypeID = " << Ty->getTypeID() << '\n';
+ errs() << "TypeID = " << Ty->getTypeID() << '\n';
llvm_unreachable("Invalid type in TypeToPostfix()");
}
return ""; // Not reached
@@ -426,7 +426,7 @@ void MSILWriter::printPtrLoad(uint64_t N) {
printSimpleInstruction("ldc.i4",utostr(N).c_str());
// FIXME: Need overflow test?
if (!isUInt32(N)) {
- cerr << "Value = " << utostr(N) << '\n';
+ errs() << "Value = " << utostr(N) << '\n';
llvm_unreachable("32-bit pointer overflowed");
}
break;
@@ -469,7 +469,7 @@ void MSILWriter::printConstLoad(const Constant* C) {
// Undefined constant value = NULL.
printPtrLoad(0);
} else {
- cerr << "Constant = " << *C << '\n';
+ errs() << "Constant = " << *C << '\n';
llvm_unreachable("Invalid constant value");
}
Out << '\n';
@@ -518,7 +518,7 @@ void MSILWriter::printValueLoad(const Value* V) {
printConstantExpr(cast<ConstantExpr>(V));
break;
default:
- cerr << "Value = " << *V << '\n';
+ errs() << "Value = " << *V << '\n';
llvm_unreachable("Invalid value location");
}
}
@@ -533,7 +533,7 @@ void MSILWriter::printValueSave(const Value* V) {
printSimpleInstruction("stloc",getValueName(V).c_str());
break;
default:
- cerr << "Value = " << *V << '\n';
+ errs() << "Value = " << *V << '\n';
llvm_unreachable("Invalid value location");
}
}
@@ -695,7 +695,7 @@ void MSILWriter::printCastInstruction(unsigned int Op, const Value* V,
// FIXME: meaning that ld*/st* instruction do not change data format.
break;
default:
- cerr << "Opcode = " << Op << '\n';
+ errs() << "Opcode = " << Op << '\n';
llvm_unreachable("Invalid conversion instruction");
}
}