#include "llvm/GlobalVariable.h"
#include <algorithm>
#include <iostream>
+
using std::make_pair;
-using std::cerr;
const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf,
const uchar *EndBuf) {
}
default:
- cerr << __FILE__ << ":" << __LINE__ << ": Don't know how to deserialize"
- << " primitive Type " << PrimType << "\n";
+ std::cerr << __FILE__ << ":" << __LINE__
+ << ": Don't know how to deserialize"
+ << " primitive Type " << PrimType << "\n";
return failure(Val);
}
}
}
default:
- cerr << __FILE__ << ":" << __LINE__
- << ": Don't know how to deserialize constant value of type '"
- << Ty->getName() << "'\n";
+ std::cerr << __FILE__ << ":" << __LINE__
+ << ": Don't know how to deserialize constant value of type '"
+ << Ty->getName() << "'\n";
return failure(true);
}
#include <map>
#include <utility>
#include <list>
+#include <iostream>
// Enable to trace to figure out what the heck is going on when parsing fails
#define TRACE_LEVEL 0
#if TRACE_LEVEL // ByteCodeReading_TRACEer
-#define BCR_TRACE(n, X) if (n < TRACE_LEVEL) cerr << std::string(n*2, ' ') << X
+#define BCR_TRACE(n, X) if (n < TRACE_LEVEL) std::cerr << std::string(n*2, ' ') << X
#else
#define BCR_TRACE(n, X)
#endif
std::string getError() const { return Error; }
void dump() const {
- cerr << "BytecodeParser instance!\n";
+ std::cerr << "BytecodeParser instance!\n";
}
private: // All of this data is transient across calls to ParseBytecode
unsigned &Type, unsigned &Size) {
#if DEBUG_OUTPUT
bool Result = read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size);
- cerr << "StartLoc = " << ((unsigned)Buf & 4095)
+ std::cerr << "StartLoc = " << ((unsigned)Buf & 4095)
<< " Type = " << Type << " Size = " << Size << endl;
return Result;
#else
}
}
-void WriteBytecodeToFile(const Module *C, ostream &Out) {
+void WriteBytecodeToFile(const Module *C, std::ostream &Out) {
assert(C && "You can't write a null module!!");
std::deque<unsigned char> Buffer;
using std::string;
using std::map;
using std::ostream;
+using std::cerr;
static std::string getConstStrValue(const Constant* CPV);
using std::string;
using std::map;
using std::ostream;
+using std::cerr;
static std::string getConstStrValue(const Constant* CPV);