From b93a9a66bab4b32b5e0ef540d7a514ff4333772d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 23 Aug 2009 03:56:06 +0000 Subject: [PATCH] switch from std::ostream to raw ostream, fix file header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79815 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/LeaksContext.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/VMCore/LeaksContext.h b/lib/VMCore/LeaksContext.h index 4c45b86b5ff..b0c3a14fe84 100644 --- a/lib/VMCore/LeaksContext.h +++ b/lib/VMCore/LeaksContext.h @@ -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 struct PrinterTrait { - static void print(const T* P) { cerr << P; } + static void print(const T* P) { errs() << P; } }; template<> struct PrinterTrait { - static void print(const Value* P) { cerr << *P; } + static void print(const Value* P) { errs() << *P; } }; template @@ -68,14 +67,14 @@ struct LeakDetectorImpl { 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::iterator I = Ts.begin(), E = Ts.end(); I != E; ++I) { - cerr << "\t"; + errs() << '\t'; PrinterTrait::print(*I); - cerr << "\n"; + errs() << '\n'; } - cerr << '\n'; + errs() << '\n'; return true; } -- 2.34.1