[llvm-commits] [llvm] r79815 - /llvm/trunk/lib/VMCore/LeaksContext.h

Chris Lattner sabre at nondot.org
Sat Aug 22 20:56:06 PDT 2009


Author: lattner
Date: Sat Aug 22 22:56:06 2009
New Revision: 79815

URL: http://llvm.org/viewvc/llvm-project?rev=79815&view=rev
Log:
switch from std::ostream to raw ostream, fix file header.

Modified:
    llvm/trunk/lib/VMCore/LeaksContext.h

Modified: llvm/trunk/lib/VMCore/LeaksContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LeaksContext.h?rev=79815&r1=79814&r2=79815&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/LeaksContext.h (original)
+++ llvm/trunk/lib/VMCore/LeaksContext.h Sat Aug 22 22:56:06 2009
@@ -1,4 +1,4 @@
-//===---------------- ----LeaksContext.h - Implementation ------*- C++ -*--===//
+//===- LeaksContext.h - LeadDetector Implementation ------------*- C++ -*--===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -13,19 +13,18 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Value.h"
-#include "llvm/Support/Streams.h"
 #include "llvm/ADT/SmallPtrSet.h"
-
+#include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
 template <class T>
 struct PrinterTrait {
-  static void print(const T* P) { cerr << P; }
+  static void print(const T* P) { errs() << P; }
 };
 
 template<>
 struct PrinterTrait<Value> {
-  static void print(const Value* P) { cerr << *P; }
+  static void print(const Value* P) { errs() << *P; }
 };
 
 template <typename T>
@@ -68,14 +67,14 @@
     assert(Cache == 0 && "No value should be cached anymore!");
 
     if (!Ts.empty()) {
-      cerr << "Leaked " << Name << " objects found: " << Message << ":\n";
+      errs() << "Leaked " << Name << " objects found: " << Message << ":\n";
       for (typename SmallPtrSet<const T*, 8>::iterator I = Ts.begin(),
            E = Ts.end(); I != E; ++I) {
-        cerr << "\t";
+        errs() << '\t';
         PrinterTrait<T>::print(*I);
-        cerr << "\n";
+        errs() << '\n';
       }
-      cerr << '\n';
+      errs() << '\n';
 
       return true;
     }





More information about the llvm-commits mailing list