-//===---------------- ----LeaksContext.h - Implementation ------*- C++ -*--===//
+//===- LeaksContext.h - LeadDetector Implementation ------------*- C++ -*--===//
//
// The LLVM Compiler Infrastructure
//
//
// The LLVM Compiler Infrastructure
//
//===----------------------------------------------------------------------===//
#include "llvm/Value.h"
//===----------------------------------------------------------------------===//
#include "llvm/Value.h"
-#include "llvm/Support/Streams.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
template <class T>
struct PrinterTrait {
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> {
};
template<>
struct PrinterTrait<Value> {
- static void print(const Value* P) { cerr << *P; }
+ static void print(const Value* P) { errs() << *P; }
assert(Cache == 0 && "No value should be cached anymore!");
if (!Ts.empty()) {
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) {
for (typename SmallPtrSet<const T*, 8>::iterator I = Ts.begin(),
E = Ts.end(); I != E; ++I) {
PrinterTrait<T>::print(*I);
PrinterTrait<T>::print(*I);