summaryrefslogtreecommitdiff
path: root/lib/IR/LeaksContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/LeaksContext.h')
-rw-r--r--lib/IR/LeaksContext.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/IR/LeaksContext.h b/lib/IR/LeaksContext.h
index 52ac1704592a..47704fa1a762 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