aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constant.h1
-rw-r--r--include/llvm/Constants.h6
-rw-r--r--include/llvm/LLVMContext.h3
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.