[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp ELFWriter.cpp IntrinsicLowering.cpp LiveInterval.cpp LiveIntervalAnalysis.cpp MachineInstr.cpp VirtRegMap.cpp VirtRegMap.h

Bill Wendling isanbard at gmail.com
Wed Dec 6 17:31:58 PST 2006



Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.119 -> 1.120
DwarfWriter.cpp updated: 1.106 -> 1.107
ELFWriter.cpp updated: 1.29 -> 1.30
IntrinsicLowering.cpp updated: 1.48 -> 1.49
LiveInterval.cpp updated: 1.39 -> 1.40
LiveIntervalAnalysis.cpp updated: 1.202 -> 1.203
MachineInstr.cpp updated: 1.137 -> 1.138
VirtRegMap.cpp updated: 1.84 -> 1.85
VirtRegMap.h updated: 1.23 -> 1.24
---
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:  (+51 -57)

 AsmPrinter.cpp           |   37 ++++++++++++++++++-------------------
 DwarfWriter.cpp          |   16 +++++++---------
 ELFWriter.cpp            |    7 +++----
 IntrinsicLowering.cpp    |   24 ++++++++++++------------
 LiveInterval.cpp         |    7 +++----
 LiveIntervalAnalysis.cpp |    4 ++--
 MachineInstr.cpp         |    3 +--
 VirtRegMap.cpp           |    6 +++---
 VirtRegMap.h             |    4 ++--
 9 files changed, 51 insertions(+), 57 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.119 llvm/lib/CodeGen/AsmPrinter.cpp:1.120
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.119	Tue Nov 28 18:39:47 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp	Wed Dec  6 19:30:31 2006
@@ -25,7 +25,6 @@
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/Target/TargetMachine.h"
-#include <ostream>
 #include <cerrno>
 using namespace llvm;
 
@@ -668,8 +667,8 @@
     if (LastMI != MI) { ++Counter; LastMI = MI; }
     O << Counter;
   } else {
-    llvm_cerr << "Unknown special formatter '" << Code
-              << "' for machine instr: " << *MI;
+    cerr << "Unknown special formatter '" << Code
+         << "' for machine instr: " << *MI;
     exit(1);
   }    
 }
@@ -737,8 +736,8 @@
       case '(':             // $( -> same as GCC's { character.
         ++LastEmitted;      // Consume '(' character.
         if (CurVariant != -1) {
-          llvm_cerr << "Nested variants found in inline asm string: '"
-                    << AsmStr << "'\n";
+          cerr << "Nested variants found in inline asm string: '"
+               << AsmStr << "'\n";
           exit(1);
         }
         CurVariant = 0;     // We're in the first variant now.
@@ -746,8 +745,8 @@
       case '|':
         ++LastEmitted;  // consume '|' character.
         if (CurVariant == -1) {
-          llvm_cerr << "Found '|' character outside of variant in inline asm "
-                    << "string: '" << AsmStr << "'\n";
+          cerr << "Found '|' character outside of variant in inline asm "
+               << "string: '" << AsmStr << "'\n";
           exit(1);
         }
         ++CurVariant;   // We're in the next variant.
@@ -755,8 +754,8 @@
       case ')':         // $) -> same as GCC's } char.
         ++LastEmitted;  // consume ')' character.
         if (CurVariant == -1) {
-          llvm_cerr << "Found '}' character outside of variant in inline asm "
-                    << "string: '" << AsmStr << "'\n";
+          cerr << "Found '}' character outside of variant in inline asm "
+               << "string: '" << AsmStr << "'\n";
           exit(1);
         }
         CurVariant = -1;
@@ -774,8 +773,8 @@
       char *IDEnd;
       long Val = strtol(IDStart, &IDEnd, 10); // We only accept numbers for IDs.
       if (!isdigit(*IDStart) || (Val == 0 && errno == EINVAL)) {
-        llvm_cerr << "Bad $ operand number in inline asm string: '" 
-                  << AsmStr << "'\n";
+        cerr << "Bad $ operand number in inline asm string: '" 
+             << AsmStr << "'\n";
         exit(1);
       }
       LastEmitted = IDEnd;
@@ -788,8 +787,8 @@
         if (*LastEmitted == ':') {
           ++LastEmitted;    // Consume ':' character.
           if (*LastEmitted == 0) {
-            llvm_cerr << "Bad ${:} expression in inline asm string: '" 
-                      << AsmStr << "'\n";
+            cerr << "Bad ${:} expression in inline asm string: '" 
+                 << AsmStr << "'\n";
             exit(1);
           }
           
@@ -798,16 +797,16 @@
         }
         
         if (*LastEmitted != '}') {
-          llvm_cerr << "Bad ${} expression in inline asm string: '" 
-                    << AsmStr << "'\n";
+          cerr << "Bad ${} expression in inline asm string: '" 
+               << AsmStr << "'\n";
           exit(1);
         }
         ++LastEmitted;    // Consume '}' character.
       }
       
       if ((unsigned)Val >= NumOperands-1) {
-        llvm_cerr << "Invalid $ operand number in inline asm string: '" 
-                  << AsmStr << "'\n";
+        cerr << "Invalid $ operand number in inline asm string: '" 
+             << AsmStr << "'\n";
         exit(1);
       }
       
@@ -841,8 +840,8 @@
           }
         }
         if (Error) {
-          llvm_cerr << "Invalid operand found in inline asm: '"
-                    << AsmStr << "'\n";
+          cerr << "Invalid operand found in inline asm: '"
+               << AsmStr << "'\n";
           MI->dump();
           exit(1);
         }


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.106 llvm/lib/CodeGen/DwarfWriter.cpp:1.107
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.106	Wed Dec  6 11:43:18 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp	Wed Dec  6 19:30:31 2006
@@ -31,10 +31,8 @@
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetFrameInfo.h"
-
 #include <ostream>
 #include <string>
-
 using namespace llvm;
 using namespace llvm::dwarf;
 
@@ -139,7 +137,7 @@
   }
   
 #ifndef NDEBUG
-  void print(llvm_ostream &O) const {
+  void print(OStream &O) const {
     if (O.stream()) print(*O.stream());
   }
   void print(std::ostream &O) const {
@@ -247,7 +245,7 @@
   void Emit(const Dwarf &DW) const; 
       
 #ifndef NDEBUG
-  void print(llvm_ostream &O) {
+  void print(OStream &O) {
     if (O.stream()) print(*O.stream());
   }
   void print(std::ostream &O);
@@ -337,7 +335,7 @@
   void Profile(FoldingSetNodeID &ID) ;
       
 #ifndef NDEBUG
-  void print(llvm_ostream &O, unsigned IncIndent = 0) {
+  void print(OStream &O, unsigned IncIndent = 0) {
     if (O.stream()) print(*O.stream(), IncIndent);
   }
   void print(std::ostream &O, unsigned IncIndent = 0);
@@ -388,7 +386,7 @@
   virtual void Profile(FoldingSetNodeID &ID) = 0;
       
 #ifndef NDEBUG
-  void print(llvm_ostream &O) {
+  void print(OStream &O) {
     if (O.stream()) print(*O.stream());
   }
   virtual void print(std::ostream &O) = 0;
@@ -2861,14 +2859,14 @@
       << "\n";
   }
 }
-void DIEAbbrev::dump() { print(llvm_cerr); }
+void DIEAbbrev::dump() { print(cerr); }
 #endif
 
 //===----------------------------------------------------------------------===//
 
 #ifndef NDEBUG
 void DIEValue::dump() {
-  print(llvm_cerr);
+  print(cerr);
 }
 #endif
 
@@ -3079,7 +3077,7 @@
 }
 
 void DIE::dump() {
-  print(llvm_cerr);
+  print(cerr);
 }
 #endif
 


Index: llvm/lib/CodeGen/ELFWriter.cpp
diff -u llvm/lib/CodeGen/ELFWriter.cpp:1.29 llvm/lib/CodeGen/ELFWriter.cpp:1.30
--- llvm/lib/CodeGen/ELFWriter.cpp:1.29	Tue Nov 28 18:39:47 2006
+++ llvm/lib/CodeGen/ELFWriter.cpp	Wed Dec  6 19:30:31 2006
@@ -39,7 +39,6 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/Mangler.h"
 #include "llvm/Support/Streams.h"
-#include <ostream>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//
@@ -104,9 +103,9 @@
                       ELFWriter::ELFSection::SHF_EXECINSTR |
                       ELFWriter::ELFSection::SHF_ALLOC);
   OutBuffer = &ES->SectionData;
-  llvm_cerr << "FIXME: This code needs to be updated for changes in the"
-            << " CodeEmitter interfaces.  In particular, this should set "
-            << "BufferBegin/BufferEnd/CurBufferPtr, not deal with OutBuffer!";
+  cerr << "FIXME: This code needs to be updated for changes in the"
+       << " CodeEmitter interfaces.  In particular, this should set "
+       << "BufferBegin/BufferEnd/CurBufferPtr, not deal with OutBuffer!";
   abort();
 
   // Upgrade the section alignment if required.


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.48 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.49
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.48	Mon Nov 27 20:08:17 2006
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp	Wed Dec  6 19:30:31 2006
@@ -274,12 +274,12 @@
 
   switch (Callee->getIntrinsicID()) {
   case Intrinsic::not_intrinsic:
-    llvm_cerr << "Cannot lower a call to a non-intrinsic function '"
-              << Callee->getName() << "'!\n";
+    cerr << "Cannot lower a call to a non-intrinsic function '"
+         << Callee->getName() << "'!\n";
     abort();
   default:
-    llvm_cerr << "Error: Code generator does not support intrinsic function '"
-              << Callee->getName() << "'!\n";
+    cerr << "Error: Code generator does not support intrinsic function '"
+         << Callee->getName() << "'!\n";
     abort();
 
     // The setjmp/longjmp intrinsics should only exist in the code if it was
@@ -356,9 +356,9 @@
   case Intrinsic::stackrestore: {
     static bool Warned = false;
     if (!Warned)
-      llvm_cerr << "WARNING: this target does not support the llvm.stack"
-                << (Callee->getIntrinsicID() == Intrinsic::stacksave ?
-                    "save" : "restore") << " intrinsic.\n";
+      cerr << "WARNING: this target does not support the llvm.stack"
+           << (Callee->getIntrinsicID() == Intrinsic::stacksave ?
+               "save" : "restore") << " intrinsic.\n";
     Warned = true;
     if (Callee->getIntrinsicID() == Intrinsic::stacksave)
       CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
@@ -367,9 +367,9 @@
     
   case Intrinsic::returnaddress:
   case Intrinsic::frameaddress:
-    llvm_cerr << "WARNING: this target does not support the llvm."
-              << (Callee->getIntrinsicID() == Intrinsic::returnaddress ?
-                  "return" : "frame") << "address intrinsic.\n";
+    cerr << "WARNING: this target does not support the llvm."
+         << (Callee->getIntrinsicID() == Intrinsic::returnaddress ?
+             "return" : "frame") << "address intrinsic.\n";
     CI->replaceAllUsesWith(ConstantPointerNull::get(
                                             cast<PointerType>(CI->getType())));
     break;
@@ -380,8 +380,8 @@
   case Intrinsic::pcmarker:
     break;    // Simply strip out pcmarker on unsupported architectures
   case Intrinsic::readcyclecounter: {
-    llvm_cerr << "WARNING: this target does not support the llvm.readcyclecoun"
-              << "ter intrinsic.  It is being lowered to a constant 0\n";
+    cerr << "WARNING: this target does not support the llvm.readcyclecoun"
+         << "ter intrinsic.  It is being lowered to a constant 0\n";
     CI->replaceAllUsesWith(ConstantInt::get(Type::ULongTy, 0));
     break;
   }


Index: llvm/lib/CodeGen/LiveInterval.cpp
diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.39 llvm/lib/CodeGen/LiveInterval.cpp:1.40
--- llvm/lib/CodeGen/LiveInterval.cpp:1.39	Tue Nov 28 18:39:47 2006
+++ llvm/lib/CodeGen/LiveInterval.cpp	Wed Dec  6 19:30:31 2006
@@ -23,7 +23,6 @@
 #include "llvm/Support/Streams.h"
 #include "llvm/Target/MRegisterInfo.h"
 #include <algorithm>
-#include <iostream>
 #include <map>
 using namespace llvm;
 
@@ -472,10 +471,10 @@
 }
 
 void LiveRange::dump() const {
-  llvm_cerr << *this << "\n";
+  cerr << *this << "\n";
 }
 
-void LiveInterval::print(llvm_ostream OS, const MRegisterInfo *MRI) const {
+void LiveInterval::print(OStream OS, const MRegisterInfo *MRI) const {
   if (MRI && MRegisterInfo::isPhysicalRegister(reg))
     OS << MRI->getName(reg);
   else
@@ -508,5 +507,5 @@
 }
 
 void LiveInterval::dump() const {
-  llvm_cerr << *this << "\n";
+  cerr << *this << "\n";
 }


Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.202 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.203
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.202	Wed Dec  6 19:19:37 2006
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp	Wed Dec  6 19:30:31 2006
@@ -419,9 +419,9 @@
 
 void LiveIntervals::printRegName(unsigned reg) const {
   if (MRegisterInfo::isPhysicalRegister(reg))
-    llvm_cerr << mri_->getName(reg);
+    cerr << mri_->getName(reg);
   else
-    llvm_cerr << "%reg" << reg;
+    cerr << "%reg" << reg;
 }
 
 /// isReDefinedByTwoAddr - Returns true if the Reg re-definition is due to


Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.137 llvm/lib/CodeGen/MachineInstr.cpp:1.138
--- llvm/lib/CodeGen/MachineInstr.cpp:1.137	Wed Dec  6 02:27:42 2006
+++ llvm/lib/CodeGen/MachineInstr.cpp	Wed Dec  6 19:30:31 2006
@@ -18,7 +18,6 @@
 #include "llvm/Target/MRegisterInfo.h"
 #include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/Streams.h"
-#include <iostream>
 using namespace llvm;
 
 /// MachineInstr ctor - This constructor creates a dummy MachineInstr with
@@ -201,7 +200,7 @@
 }
 
 void MachineInstr::dump() const {
-  llvm_cerr << "  " << *this;
+  cerr << "  " << *this;
 }
 
 static inline void OutputReg(std::ostream &os, unsigned RegNo,


Index: llvm/lib/CodeGen/VirtRegMap.cpp
diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.84 llvm/lib/CodeGen/VirtRegMap.cpp:1.85
--- llvm/lib/CodeGen/VirtRegMap.cpp:1.84	Wed Dec  6 19:19:37 2006
+++ llvm/lib/CodeGen/VirtRegMap.cpp	Wed Dec  6 19:30:31 2006
@@ -112,11 +112,11 @@
 }
 
 void VirtRegMap::print(std::ostream &OS) const {
-  llvm_ostream LOS(OS);
+  OStream LOS(OS);
   print(LOS);
 }
 
-void VirtRegMap::print(llvm_ostream &OS) const {
+void VirtRegMap::print(OStream &OS) const {
   const MRegisterInfo* MRI = MF.getTarget().getRegisterInfo();
 
   OS << "********** REGISTER MAP **********\n";
@@ -135,7 +135,7 @@
 }
 
 void VirtRegMap::dump() const {
-  llvm_ostream OS = DOUT;
+  OStream OS = DOUT;
   print(OS);
 }
 


Index: llvm/lib/CodeGen/VirtRegMap.h
diff -u llvm/lib/CodeGen/VirtRegMap.h:1.23 llvm/lib/CodeGen/VirtRegMap.h:1.24
--- llvm/lib/CodeGen/VirtRegMap.h:1.23	Thu Nov 16 20:09:07 2006
+++ llvm/lib/CodeGen/VirtRegMap.h	Wed Dec  6 19:30:31 2006
@@ -19,12 +19,12 @@
 
 #include "llvm/Target/MRegisterInfo.h"
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/Support/Streams.h"
 #include <map>
 
 namespace llvm {
   class MachineInstr;
   class TargetInstrInfo;
-  class llvm_ostream;
 
   class VirtRegMap {
   public:
@@ -145,7 +145,7 @@
     }
 
     void print(std::ostream &OS) const;
-    void print(llvm_ostream &OS) const;
+    void print(OStream &OS) const;
     void dump() const;
   };
 






More information about the llvm-commits mailing list