summaryrefslogtreecommitdiff
path: root/include/llvm/Metadata.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-10 18:16:08 +0000
committerOwen Anderson <resistor@mac.com>2009-08-10 18:16:08 +0000
commit0631fce85050f8f633e5fd032875d9151e0db4da (patch)
treef959eda6f313fbd8b5a067a450034e22213b1b3a /include/llvm/Metadata.h
parentf9bdeddb96043559c61f176f8077e3b91a0c544f (diff)
downloadllvm-0631fce85050f8f633e5fd032875d9151e0db4da.tar.gz
llvm-0631fce85050f8f633e5fd032875d9151e0db4da.tar.bz2
llvm-0631fce85050f8f633e5fd032875d9151e0db4da.tar.xz
Change the MDNode uniquing to a ValueMap, at Devang's request.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Metadata.h')
-rw-r--r--include/llvm/Metadata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h
index d383fc4357..ab2c073cad 100644
--- a/include/llvm/Metadata.h
+++ b/include/llvm/Metadata.h
@@ -28,6 +28,8 @@
namespace llvm {
class Constant;
struct LLVMContext;
+template<class ConstantClass, class TypeClass, class ValType>
+struct ConstantCreator;
//===----------------------------------------------------------------------===//
// MetadataBase - A base class for MDNode, MDString and NamedMDNode.
@@ -115,6 +117,8 @@ class MDNode : public MetadataBase, public FoldingSetNode {
unsigned getNumOperands() { return User::getNumOperands(); }
SmallVector<WeakVH, 4> Node;
+
+ friend struct ConstantCreator<MDNode, Type, std::vector<Value*> >;
protected:
explicit MDNode(Value*const* Vals, unsigned NumVals);
public: