Clean up std namespace issues
authorChris Lattner <sabre@nondot.org>
Sun, 24 Feb 2002 23:02:40 +0000 (23:02 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 24 Feb 2002 23:02:40 +0000 (23:02 +0000)
Silence warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1790 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/EmitBytecodeToAssembly.cpp
lib/Target/SparcV9/SparcV9AsmPrinter.cpp
lib/Target/SparcV9/SparcV9Internals.h
lib/Target/SparcV9/SparcV9RegInfo.cpp

index 7cbf08557fb9c85dd855867275340e0e48077adb..1a14a5300b7f23fbbd954059e277a8a60cf969de 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "SparcInternals.h"
 #include "llvm/Bytecode/Writer.h"
+#include <ostream>
 
 namespace {
 
@@ -17,10 +18,10 @@ namespace {
   class sparcasmbuf : public streambuf {
     std::ostream &BaseStr;
   public:
-    typedef char        char_type;
-    typedef int         int_type;
-    typedef streampos   pos_type;
-    typedef streamoff   off_type;
+    typedef char           char_type;
+    typedef int            int_type;
+    typedef std::streampos pos_type;
+    typedef std::streamoff off_type;
     
     sparcasmbuf(std::ostream &On) : BaseStr(On) {}
 
@@ -39,10 +40,10 @@ namespace {
   class osparcasmstream : public ostream {
     sparcasmbuf sb;
   public:
-    typedef char      char_type;
-    typedef int       int_type;
-    typedef streampos pos_type;
-    typedef streamoff off_type;
+    typedef char           char_type;
+    typedef int            int_type;
+    typedef std::streampos pos_type;
+    typedef std::streamoff off_type;
 
     explicit osparcasmstream(ostream &On) : ostream(&sb), sb(On) { }
 
index 517420730aec6fdc95ad7e25deb4da38286c11bb..1bc192cf37bc3ce9ba8b322e255b46c2533484ae 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/Module.h"
 #include "Support/StringExtras.h"
 #include "Support/HashExtras.h"
+#include <ostream>
 using std::string;
 
 namespace {
@@ -392,7 +393,8 @@ namespace {
 
 class SparcModuleAsmPrinter : public Pass, public AsmPrinter {
 public:
-  SparcModuleAsmPrinter(ostream &os, TargetMachine &t) : AsmPrinter(os, t) {}
+  SparcModuleAsmPrinter(std::ostream &os, TargetMachine &t)
+    : AsmPrinter(os, t) {}
 
   virtual bool run(Module *M) {
     startModule(M);
index 73f02c345bdeb03be268a89cd4b3960d19006659..6230ae1f77c80af0d3a22c8baa01159e6c32e1c5 100644 (file)
@@ -310,7 +310,7 @@ public:
     else if (ty <= Type::DoubleTyID)
       res = FloatRegClassID;           // sparc float reg class
     else { 
-      std::cerr << "TypeID: " << ty << "\n";
+      //std::cerr << "TypeID: " << ty << "\n";
       assert(0 && "Cannot resolve register class for type");
       return 0;
     }
index d80678c40af74543f0ffd6a33bfcdaa884712090..4da596db46a31927b96592d8a7e998293aedd7a4 100644 (file)
@@ -192,6 +192,7 @@ int UltraSparcRegInfo::getRegType(int reg) const {
     return IntCCRegType;             
   else 
     assert(0 && "Invalid register number in getRegType");
+  return 0;
 }