Changes in directory llvm/lib/ExecutionEngine/Interpreter:
Execution.cpp updated: 1.151 -> 1.152 ExternalFunctions.cpp updated: 1.91 -> 1.92 --- Log message: Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are now cerr, cout, and NullStream resp. --- Diffs of the changes: (+35 -36) Execution.cpp | 57 ++++++++++++++++++++++++-------------------------- ExternalFunctions.cpp | 14 ++++++------ 2 files changed, 35 insertions(+), 36 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.151 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.152 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.151 Wed Dec 6 11:46:32 2006 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Wed Dec 6 19:30:31 2006 @@ -188,7 +188,7 @@ getOperandValue(CE->getOperand(1), SF), getOperandValue(CE->getOperand(2), SF)); default: - llvm_cerr << "Unhandled ConstantExpr: " << *CE << "\n"; + cerr << "Unhandled ConstantExpr: " << *CE << "\n"; abort(); return GenericValue(); } @@ -236,7 +236,7 @@ IMPLEMENT_BINARY_OPERATOR(+, Float); IMPLEMENT_BINARY_OPERATOR(+, Double); default: - llvm_cerr << "Unhandled type for Add instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Add instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -257,7 +257,7 @@ IMPLEMENT_BINARY_OPERATOR(-, Float); IMPLEMENT_BINARY_OPERATOR(-, Double); default: - llvm_cerr << "Unhandled type for Sub instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Sub instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -278,7 +278,7 @@ IMPLEMENT_BINARY_OPERATOR(*, Float); IMPLEMENT_BINARY_OPERATOR(*, Double); default: - llvm_cerr << "Unhandled type for Mul instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Mul instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -296,7 +296,7 @@ IMPLEMENT_SIGNLESS_BINOP(/, UInt, Int); IMPLEMENT_SIGNLESS_BINOP(/, ULong, Long); default: - llvm_cerr << "Unhandled type for UDiv instruction: " << *Ty << "\n"; + cerr << "Unhandled type for UDiv instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -311,7 +311,7 @@ IMPLEMENT_SIGNLESS_BINOP(/, Int, UInt); IMPLEMENT_SIGNLESS_BINOP(/, Long, ULong); default: - llvm_cerr << "Unhandled type for SDiv instruction: " << *Ty << "\n"; + cerr << "Unhandled type for SDiv instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -324,7 +324,7 @@ IMPLEMENT_BINARY_OPERATOR(/, Float); IMPLEMENT_BINARY_OPERATOR(/, Double); default: - llvm_cerr << "Unhandled type for Div instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Div instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -339,7 +339,7 @@ IMPLEMENT_SIGNLESS_BINOP(%, UInt, Int); IMPLEMENT_SIGNLESS_BINOP(%, ULong, Long); default: - llvm_cerr << "Unhandled type for URem instruction: " << *Ty << "\n"; + cerr << "Unhandled type for URem instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -354,7 +354,7 @@ IMPLEMENT_SIGNLESS_BINOP(%, Int, UInt); IMPLEMENT_SIGNLESS_BINOP(%, Long, ULong); default: - llvm_cerr << "Unhandled type for Rem instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Rem instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -371,7 +371,7 @@ Dest.DoubleVal = fmod(Src1.DoubleVal, Src2.DoubleVal); break; default: - llvm_cerr << "Unhandled type for Rem instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Rem instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -391,7 +391,7 @@ IMPLEMENT_BINARY_OPERATOR(&, ULong); IMPLEMENT_BINARY_OPERATOR(&, Long); default: - llvm_cerr << "Unhandled type for And instruction: " << *Ty << "\n"; + cerr << "Unhandled type for And instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -411,7 +411,7 @@ IMPLEMENT_BINARY_OPERATOR(|, ULong); IMPLEMENT_BINARY_OPERATOR(|, Long); default: - llvm_cerr << "Unhandled type for Or instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Or instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -431,7 +431,7 @@ IMPLEMENT_BINARY_OPERATOR(^, ULong); IMPLEMENT_BINARY_OPERATOR(^, Long); default: - llvm_cerr << "Unhandled type for Xor instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Xor instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -465,7 +465,7 @@ IMPLEMENT_SETCC(==, Double); IMPLEMENT_POINTERSETCC(==); default: - llvm_cerr << "Unhandled type for SetEQ instruction: " << *Ty << "\n"; + cerr << "Unhandled type for SetEQ instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -488,7 +488,7 @@ IMPLEMENT_POINTERSETCC(!=); default: - llvm_cerr << "Unhandled type for SetNE instruction: " << *Ty << "\n"; + cerr << "Unhandled type for SetNE instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -510,7 +510,7 @@ IMPLEMENT_SETCC(<=, Double); IMPLEMENT_POINTERSETCC(<=); default: - llvm_cerr << "Unhandled type for SetLE instruction: " << *Ty << "\n"; + cerr << "Unhandled type for SetLE instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -532,7 +532,7 @@ IMPLEMENT_SETCC(>=, Double); IMPLEMENT_POINTERSETCC(>=); default: - llvm_cerr << "Unhandled type for SetGE instruction: " << *Ty << "\n"; + cerr << "Unhandled type for SetGE instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -554,7 +554,7 @@ IMPLEMENT_SETCC(<, Double); IMPLEMENT_POINTERSETCC(<); default: - llvm_cerr << "Unhandled type for SetLT instruction: " << *Ty << "\n"; + cerr << "Unhandled type for SetLT instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -576,7 +576,7 @@ IMPLEMENT_SETCC(>, Double); IMPLEMENT_POINTERSETCC(>); default: - llvm_cerr << "Unhandled type for SetGT instruction: " << *Ty << "\n"; + cerr << "Unhandled type for SetGT instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -609,7 +609,7 @@ case Instruction::SetLT: R = executeSetLTInst(Src1, Src2, Ty); break; case Instruction::SetGT: R = executeSetGTInst(Src1, Src2, Ty); break; default: - llvm_cerr << "Don't know how to handle this binary operator!\n-->" << I; + cerr << "Don't know how to handle this binary operator!\n-->" << I; abort(); } @@ -710,7 +710,7 @@ } void Interpreter::visitUnreachableInst(UnreachableInst &I) { - llvm_cerr << "ERROR: Program executed an 'unreachable' instruction!\n"; + cerr << "ERROR: Program executed an 'unreachable' instruction!\n"; abort(); } @@ -978,7 +978,7 @@ IMPLEMENT_SHIFT(<<, ULong); IMPLEMENT_SHIFT(<<, Long); default: - llvm_cerr << "Unhandled type for Shl instruction: " << *Ty << "\n"; + cerr << "Unhandled type for Shl instruction: " << *Ty << "\n"; } return Dest; } @@ -992,7 +992,7 @@ IMPLEMENT_SIGNLESS_SHIFT(>>, UInt, Int); IMPLEMENT_SIGNLESS_SHIFT(>>, ULong, Long); default: - llvm_cerr << "Unhandled type for LShr instruction: " << *Ty << "\n"; + cerr << "Unhandled type for LShr instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -1007,7 +1007,7 @@ IMPLEMENT_SIGNLESS_SHIFT(>>, Int, UInt); IMPLEMENT_SIGNLESS_SHIFT(>>, Long, ULong); default: - llvm_cerr << "Unhandled type for AShr instruction: " << *Ty << "\n"; + cerr << "Unhandled type for AShr instruction: " << *Ty << "\n"; abort(); } return Dest; @@ -1065,14 +1065,14 @@ IMPLEMENT_CAST(DESTTY, DESTCTY, Float); \ IMPLEMENT_CAST(DESTTY, DESTCTY, Double) \ default: \ - llvm_cerr << "Unhandled cast: " \ + cerr << "Unhandled cast: " \ << *SrcTy << " to " << *DstTy << "\n"; \ abort(); \ } \ break #define IMPLEMENT_CAST_END \ - default: llvm_cerr \ + default: cerr \ << "Unhandled dest type for cast instruction: " \ << *DstTy << "\n"; \ abort(); \ @@ -1226,8 +1226,7 @@ IMPLEMENT_CAST_END break; default: - llvm_cerr - << "Invalid cast opcode for cast instruction: " << opcode << "\n"; + cerr << "Invalid cast opcode for cast instruction: " << opcode << "\n"; abort(); } return Dest; @@ -1266,7 +1265,7 @@ IMPLEMENT_VAARG(Double); IMPLEMENT_VAARG(Bool); default: - llvm_cerr << "Unhandled dest type for vaarg instruction: " << *Ty << "\n"; + cerr << "Unhandled dest type for vaarg instruction: " << *Ty << "\n"; abort(); } Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.91 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.92 --- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.91 Fri Dec 1 20:22:01 2006 +++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Wed Dec 6 19:30:31 2006 @@ -93,8 +93,8 @@ std::map<const Function *, ExFunc>::iterator FI = Functions.find(F); ExFunc Fn = (FI == Functions.end()) ? lookupFunction(F) : FI->second; if (Fn == 0) { - llvm_cerr << "Tried to execute an unknown external function: " - << F->getType()->getDescription() << " " << F->getName() << "\n"; + cerr << "Tried to execute an unknown external function: " + << F->getType()->getDescription() << " " << F->getName() << "\n"; if (F->getName() == "__main") return GenericValue(); abort(); @@ -114,19 +114,19 @@ // void putchar(sbyte) GenericValue lle_Vb_putchar(FunctionType *M, const vector<GenericValue> &Args) { - llvm_cout << Args[0].SByteVal; + cout << Args[0].SByteVal; return GenericValue(); } // int putchar(int) GenericValue lle_ii_putchar(FunctionType *M, const vector<GenericValue> &Args) { - llvm_cout << ((char)Args[0].IntVal) << std::flush; + cout << ((char)Args[0].IntVal) << std::flush; return Args[0]; } // void putchar(ubyte) GenericValue lle_VB_putchar(FunctionType *M, const vector<GenericValue> &Args) { - llvm_cout << Args[0].SByteVal << std::flush; + cout << Args[0].SByteVal << std::flush; return Args[0]; } @@ -332,7 +332,7 @@ sprintf(Buffer, FmtBuf, (void*)GVTOP(Args[ArgNo++])); break; case 's': sprintf(Buffer, FmtBuf, (char*)GVTOP(Args[ArgNo++])); break; - default: llvm_cerr << "<unknown printf code '" << *FmtStr << "'!>"; + default: cerr << "<unknown printf code '" << *FmtStr << "'!>"; ArgNo++; break; } strcpy(OutputBuffer, Buffer); @@ -350,7 +350,7 @@ NewArgs.push_back(PTOGV(Buffer)); NewArgs.insert(NewArgs.end(), Args.begin(), Args.end()); GenericValue GV = lle_X_sprintf(M, NewArgs); - llvm_cout << Buffer; + cout << Buffer; return GV; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits