diff options
author | Devang Patel <dpatel@apple.com> | 2009-07-23 01:19:53 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-07-23 01:19:53 +0000 |
commit | 6b0c2173a348ec7349bee2185f1ad16d9f07040c (patch) | |
tree | 8e821af6a990b44643f03ea5f1b9f73c5c41c23f | |
parent | 104cf9e02b0ed94d4173869a598af6c6972a8660 (diff) |
Hide constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76835 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/MDNode.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/MDNode.h b/include/llvm/MDNode.h index a06d720bf1..14bfe5798a 100644 --- a/include/llvm/MDNode.h +++ b/include/llvm/MDNode.h @@ -33,10 +33,11 @@ namespace llvm { //===----------------------------------------------------------------------===// // 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 @@ public: /// 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. |