MDNode, MDString, and NamedMDNode are not meant to be subclassed;
authorDan Gohman <gohman@apple.com>
Tue, 24 Aug 2010 15:34:03 +0000 (15:34 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 24 Aug 2010 15:34:03 +0000 (15:34 +0000)
make their protected members private. And remove an unnecessary
explicit keyword.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111915 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Metadata.h

index f773817e829f87d2e8ef4bbd775702543c4556a5..f5a80a3dced2638555151693b1850123cd058d64 100644 (file)
@@ -38,7 +38,6 @@ class MDString : public Value {
   MDString(const MDString &);            // DO NOT IMPLEMENT
 
   StringRef Str;
-protected:
   explicit MDString(LLVMContext &C, StringRef S);
 
 public:
@@ -111,9 +110,8 @@ class MDNode : public Value, public FoldingSetNode {
   void replaceOperand(MDNodeOperand *Op, Value *NewVal);
   ~MDNode();
 
-protected:
-  explicit MDNode(LLVMContext &C, Value *const *Vals, unsigned NumVals,
-                  bool isFunctionLocal);
+  MDNode(LLVMContext &C, Value *const *Vals, unsigned NumVals,
+         bool isFunctionLocal);
   
   static MDNode *getMDNode(LLVMContext &C, Value *const *Vals, unsigned NumVals,
                            FunctionLocalness FL, bool Insert = true);
@@ -201,7 +199,6 @@ class NamedMDNode : public ilist_node<NamedMDNode> {
 
   void setParent(Module *M) { Parent = M; }
 
-protected:
   explicit NamedMDNode(const Twine &N);
 
 public: