changes to make it compatible with 64bit gcc
authorAnand Shukla <ashukla@cs.uiuc.edu>
Tue, 25 Jun 2002 20:44:04 +0000 (20:44 +0000)
committerAnand Shukla <ashukla@cs.uiuc.edu>
Tue, 25 Jun 2002 20:44:04 +0000 (20:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2790 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Reader/ConstantReader.cpp
lib/Bytecode/Reader/ReaderInternals.h
lib/Bytecode/Writer/Writer.cpp
lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index ad27739bb2bd5f113ea84976d00d2475a152b60a..7da3a1704b538e16493058123f83bc46bd732311 100644 (file)
@@ -14,8 +14,8 @@
 #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) {
@@ -91,8 +91,9 @@ const Type *BytecodeParser::parseTypeConstant(const uchar *&Buf,
   }
 
   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);
   }
 }
@@ -325,9 +326,9 @@ bool BytecodeParser::parseConstantValue(const uchar *&Buf, const uchar *EndBuf,
   }
 
   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);
   }
 
index 4a21962b162595c7b8d7d9fd70bfeac40cb389f4..f98db725bc7946fd6741a7b8639f86b5b5d5a28f 100644 (file)
 #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
@@ -51,7 +52,7 @@ public:
   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
@@ -167,7 +168,7 @@ static inline bool readBlock(const uchar *&Buf, const uchar *EndBuf,
                             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
index 5545834ff7d9068a8d9f9827ec1008a44525f9b4..75a25f2015cb7758192c9cda7ff20cc4d54d0ec2 100644 (file)
@@ -199,7 +199,7 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
   }
 }
 
-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;
index 27db6cf3e9bffb58f52f4988538c8f35ca534626..dfb8a19529f813c50af2e13d85acff36c003dc4c 100644 (file)
@@ -26,6 +26,7 @@
 using std::string;
 using std::map;
 using std::ostream;
+using std::cerr;
 
 static std::string getConstStrValue(const Constant* CPV);
 
index 27db6cf3e9bffb58f52f4988538c8f35ca534626..dfb8a19529f813c50af2e13d85acff36c003dc4c 100644 (file)
@@ -26,6 +26,7 @@
 using std::string;
 using std::map;
 using std::ostream;
+using std::cerr;
 
 static std::string getConstStrValue(const Constant* CPV);