From 400aea6b9d4d0a33f4c6cae4cada7e54029fccc4 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 1 Sep 2009 06:53:41 +0000 Subject: Update for LLVM ostream changes. - Includes patch by Michael Stone! git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@80665 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Expr/Expr.cpp | 6 +++--- lib/Expr/Lexer.cpp | 8 ++++---- lib/Expr/Parser.cpp | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/Expr') diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp index b1bf9824..386d29de 100644 --- a/lib/Expr/Expr.cpp +++ b/lib/Expr/Expr.cpp @@ -10,13 +10,13 @@ #include "klee/Expr.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Streams.h" // FIXME: We shouldn't need this once fast constant support moves into // Core. If we need to do arithmetic, we probably want to use APInt. #include "klee/Internal/Support/IntEvaluation.h" #include "klee/util/ExprPPrinter.h" +#include #include using namespace klee; @@ -291,8 +291,8 @@ void Expr::print(std::ostream &os) const { } void Expr::dump() const { - this->print(*llvm::cerr.stream()); - llvm::cerr << std::endl; + this->print(std::cerr); + std::cerr << std::endl; } /***/ diff --git a/lib/Expr/Lexer.cpp b/lib/Expr/Lexer.cpp index d8809a53..84e2c185 100644 --- a/lib/Expr/Lexer.cpp +++ b/lib/Expr/Lexer.cpp @@ -10,7 +10,7 @@ #include "expr/Lexer.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/raw_ostream.h" #include #include @@ -53,9 +53,9 @@ const char *Token::getKindName() const { } void Token::dump() { - llvm::cerr << "(Token \"" << getKindName() << "\" " - << (void*) start << " " << length << " " - << line << " " << column << ")"; + llvm::errs() << "(Token \"" << getKindName() << "\" " + << (void*) start << " " << length << " " + << line << " " << column << ")"; } /// diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp index 11fb8546..88729c09 100644 --- a/lib/Expr/Parser.cpp +++ b/lib/Expr/Parser.cpp @@ -18,7 +18,7 @@ #include "llvm/ADT/APInt.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/Streams.h" +#include "llvm/Support/raw_ostream.h" #include #include @@ -1523,9 +1523,9 @@ void ParserImpl::Error(const char *Message, const Token &At) { if (MaxErrors && NumErrors >= MaxErrors) return; - llvm::cerr << Filename - << ":" << At.line << ":" << At.column - << ": error: " << Message << "\n"; + std::cerr << Filename + << ":" << At.line << ":" << At.column + << ": error: " << Message << "\n"; // Skip carat diagnostics on EOF token. if (At.kind == Token::EndOfFile) @@ -1545,18 +1545,18 @@ void ParserImpl::Error(const char *Message, const Token &At) { ++LineEnd; // Show the line. - llvm::cerr << std::string(LineBegin, LineEnd) << "\n"; + std::cerr << std::string(LineBegin, LineEnd) << "\n"; // Show the caret or squiggly, making sure to print back spaces the // same. for (const char *S=LineBegin; S != At.start; ++S) - llvm::cerr << (isspace(*S) ? *S : ' '); + std::cerr << (isspace(*S) ? *S : ' '); if (At.length > 1) { for (unsigned i=0; i