[llvm-commits] [llvm] r76835 - /llvm/trunk/include/llvm/MDNode.h

Devang Patel dpatel at apple.com
Wed Jul 22 18:19:53 PDT 2009


Author: dpatel
Date: Wed Jul 22 20:19:53 2009
New Revision: 76835

URL: http://llvm.org/viewvc/llvm-project?rev=76835&view=rev
Log:
Hide constructors.

Modified:
    llvm/trunk/include/llvm/MDNode.h

Modified: llvm/trunk/include/llvm/MDNode.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MDNode.h?rev=76835&r1=76834&r2=76835&view=diff

==============================================================================
--- llvm/trunk/include/llvm/MDNode.h (original)
+++ llvm/trunk/include/llvm/MDNode.h Wed Jul 22 20:19:53 2009
@@ -33,10 +33,11 @@
 //===----------------------------------------------------------------------===//
 // MetadataBase  - A base class for MDNode and MDString.
 class MetadataBase : public Value {
-public:
+protected:
   MetadataBase(const Type *Ty, unsigned scid)
     : Value(Ty, scid) {}
 
+public:
   /// getType() specialization - Type is always MetadataTy.
   ///
   inline const Type *getType() const {
@@ -63,15 +64,15 @@
 ///
 class MDString : public MetadataBase {
   MDString(const MDString &);            // DO NOT IMPLEMENT
-
   const char *StrBegin, *StrEnd;
   friend class LLVMContextImpl;
 
-public:
-  MDString(const char *begin, const char *end)
+protected:
+  explicit MDString(const char *begin, const char *end)
     : MetadataBase(Type::MetadataTy, Value::MDStringVal),
       StrBegin(begin), StrEnd(end) {}
 
+public:
   intptr_t size() const { return StrEnd - StrBegin; }
 
   /// begin() - Pointer to the first byte of the string.





More information about the llvm-commits mailing list