diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/LLVMContext.h | 1 | ||||
-rw-r--r-- | include/llvm/MDNode.h | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index 7578918..d4cd891 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -271,6 +271,7 @@ public: // Methods for erasing constants void erase(MDString *M); + void erase(MDNode *M); }; /// FOR BACKWARDS COMPATIBILITY - Returns a global context. diff --git a/include/llvm/MDNode.h b/include/llvm/MDNode.h index 6c8f755..e394436 100644 --- a/include/llvm/MDNode.h +++ b/include/llvm/MDNode.h @@ -46,6 +46,8 @@ namespace llvm { class MDNode : public Constant, public FoldingSetNode { MDNode(const MDNode &); // DO NOT IMPLEMENT + friend class LLVMContextImpl; + friend class ElementVH; struct ElementVH : public CallbackVH { MDNode *OwningNode; @@ -72,15 +74,12 @@ class MDNode : public Constant, public FoldingSetNode { SmallVector<ElementVH, 4> Node; typedef SmallVectorImpl<ElementVH>::iterator elem_iterator; + protected: explicit MDNode(Value*const* Vals, unsigned NumVals); public: typedef SmallVectorImpl<ElementVH>::const_iterator const_elem_iterator; - /// get() - Static factory methods - Return objects of the specified value. - /// - static MDNode *get(Value*const* Vals, unsigned NumVals); - Value *getElement(unsigned i) const { return Node[i]; } |