[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp LiveInterval.cpp

Bill Wendling isanbard at gmail.com
Mon Nov 27 18:08:31 PST 2006



Changes in directory llvm/lib/CodeGen:

IntrinsicLowering.cpp updated: 1.47 -> 1.48
LiveInterval.cpp updated: 1.36 -> 1.37
---
Log message:

Changed to using llvm streams.


---
Diffs of the changes:  (+14 -15)

 IntrinsicLowering.cpp |   19 +++++++++----------
 LiveInterval.cpp      |   10 +++++-----
 2 files changed, 14 insertions(+), 15 deletions(-)


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.47 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.48
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.47	Sun Nov 26 19:05:09 2006
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp	Mon Nov 27 20:08:17 2006
@@ -11,14 +11,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/CodeGen/IntrinsicLowering.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"
 #include "llvm/Instructions.h"
 #include "llvm/Type.h"
-#include <iostream>
-
+#include "llvm/CodeGen/IntrinsicLowering.h"
+#include "llvm/Support/Streams.h"
 using namespace llvm;
 
 template <class ArgIt>
@@ -275,11 +274,11 @@
 
   switch (Callee->getIntrinsicID()) {
   case Intrinsic::not_intrinsic:
-    std::cerr << "Cannot lower a call to a non-intrinsic function '"
+    llvm_cerr << "Cannot lower a call to a non-intrinsic function '"
               << Callee->getName() << "'!\n";
     abort();
   default:
-    std::cerr << "Error: Code generator does not support intrinsic function '"
+    llvm_cerr << "Error: Code generator does not support intrinsic function '"
               << Callee->getName() << "'!\n";
     abort();
 
@@ -357,9 +356,9 @@
   case Intrinsic::stackrestore: {
     static bool Warned = false;
     if (!Warned)
-      std::cerr << "WARNING: this target does not support the llvm.stack"
-       << (Callee->getIntrinsicID() == Intrinsic::stacksave ?
-           "save" : "restore") << " intrinsic.\n";
+      llvm_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()));
@@ -368,7 +367,7 @@
     
   case Intrinsic::returnaddress:
   case Intrinsic::frameaddress:
-    std::cerr << "WARNING: this target does not support the llvm."
+    llvm_cerr << "WARNING: this target does not support the llvm."
               << (Callee->getIntrinsicID() == Intrinsic::returnaddress ?
                   "return" : "frame") << "address intrinsic.\n";
     CI->replaceAllUsesWith(ConstantPointerNull::get(
@@ -381,7 +380,7 @@
   case Intrinsic::pcmarker:
     break;    // Simply strip out pcmarker on unsupported architectures
   case Intrinsic::readcyclecounter: {
-    std::cerr << "WARNING: this target does not support the llvm.readcyclecoun"
+    llvm_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.36 llvm/lib/CodeGen/LiveInterval.cpp:1.37
--- llvm/lib/CodeGen/LiveInterval.cpp:1.36	Thu Nov  2 14:25:49 2006
+++ llvm/lib/CodeGen/LiveInterval.cpp	Mon Nov 27 20:08:17 2006
@@ -18,8 +18,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/CodeGen/LiveInterval.h"
 #include "llvm/ADT/STLExtras.h"
+#include "llvm/CodeGen/LiveInterval.h"
+#include "llvm/Support/Streams.h"
 #include "llvm/Target/MRegisterInfo.h"
 #include <algorithm>
 #include <iostream>
@@ -466,16 +467,15 @@
   }
 }
 
-
 std::ostream& llvm::operator<<(std::ostream& os, const LiveRange &LR) {
   return os << '[' << LR.start << ',' << LR.end << ':' << LR.ValId << ")";
 }
 
 void LiveRange::dump() const {
-  std::cerr << *this << "\n";
+  llvm_cerr << *this << "\n";
 }
 
-void LiveInterval::print(std::ostream &OS, const MRegisterInfo *MRI) const {
+void LiveInterval::print(llvm_ostream &OS, const MRegisterInfo *MRI) const {
   if (MRI && MRegisterInfo::isPhysicalRegister(reg))
     OS << MRI->getName(reg);
   else
@@ -508,5 +508,5 @@
 }
 
 void LiveInterval::dump() const {
-  std::cerr << *this << "\n";
+  llvm_cerr << *this << "\n";
 }






More information about the llvm-commits mailing list