diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
commit | 67c32a98315f785a9ec9d531c1f571a0196c7463 (patch) | |
tree | 4abb9cbeecc7901726dd0b4a37369596c852e9ef /lib/IR/LeaksContext.h | |
parent | 9f61947910e6ab40de38e6b4034751ef1513200f (diff) |
Diffstat (limited to 'lib/IR/LeaksContext.h')
-rw-r--r-- | lib/IR/LeaksContext.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/IR/LeaksContext.h b/lib/IR/LeaksContext.h index 52ac1704592af..47704fa1a7620 100644 --- a/lib/IR/LeaksContext.h +++ b/lib/IR/LeaksContext.h @@ -12,10 +12,11 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_IR_LEAKSCONTEXT_H -#define LLVM_IR_LEAKSCONTEXT_H +#ifndef LLVM_LIB_IR_LEAKSCONTEXT_H +#define LLVM_LIB_IR_LEAKSCONTEXT_H #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/IR/Metadata.h" #include "llvm/IR/Value.h" #include "llvm/Support/raw_ostream.h" @@ -31,6 +32,10 @@ struct PrinterTrait<Value> { static void print(const Value* P) { errs() << *P; } }; +template <> struct PrinterTrait<Metadata> { + static void print(const Metadata *P) { P->print(errs()); } +}; + template <typename T> struct LeakDetectorImpl { explicit LeakDetectorImpl(const char* const name = "") : @@ -95,4 +100,4 @@ private: } -#endif // LLVM_IR_LEAKSCONTEXT_H +#endif |