diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-16 22:11:26 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-16 22:11:26 +0000 |
commit | aad3fb7362aff151e97ad457005ea3f2872fe868 (patch) | |
tree | 78ad3b3efe4d503fc275adfe42a0102d52a78587 /include | |
parent | 24cd3c4711333ca1e07cbdb34475bccfeb762bb6 (diff) | |
download | external_llvm-aad3fb7362aff151e97ad457005ea3f2872fe868.zip external_llvm-aad3fb7362aff151e97ad457005ea3f2872fe868.tar.gz external_llvm-aad3fb7362aff151e97ad457005ea3f2872fe868.tar.bz2 |
Privatize the MDString uniquing table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Constant.h | 1 | ||||
-rw-r--r-- | include/llvm/Constants.h | 6 | ||||
-rw-r--r-- | include/llvm/LLVMContext.h | 3 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 3dc5881..62b75a7 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -54,6 +54,7 @@ namespace llvm { class Constant : public User { void operator=(const Constant &); // Do not implement Constant(const Constant &); // Do not implement + protected: Constant(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) : User(ty, vty, Ops, NumOps) {} diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 199355b..487dd67 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -745,17 +745,13 @@ class MDString : public Constant { MDString(const char *begin, const char *end); const char *StrBegin, *StrEnd; + friend class LLVMContextImpl; protected: // allocate space for exactly zero operands void *operator new(size_t s) { return User::operator new(s, 0); } public: - /// get() - Static factory methods - Return objects of the specified value. - /// - static MDString *get(const char *StrBegin, const char *StrEnd); - static MDString *get(const std::string &Str); - /// size() - The length of this string. /// intptr_t size() const { return StrEnd - StrBegin; } diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index 4aa2c20..7578918 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -268,6 +268,9 @@ public: // Other helpers /// @brief Create a result type for fcmp/icmp const Type* makeCmpResultType(const Type* opnd_type); + + // Methods for erasing constants + void erase(MDString *M); }; /// FOR BACKWARDS COMPATIBILITY - Returns a global context. |