X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FConstants.h;h=a9a18d7930f3481bbc4e45268d86929ed36cc0e0;hb=b834a7b73ce0dcf8fbf8d8b0d62f69e4b78059ad;hp=3bf8b142abf3072892b8f72e80e6f9aa31cceeeb;hpb=822ccd9974a17979d2cb9c6c118f94549055b7d4;p=oota-llvm.git diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 3bf8b142abf..a9a18d7930f 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -715,58 +715,6 @@ public: return V->getValueID() == UndefValueVal; } }; - -//===----------------------------------------------------------------------===// -/// MDString - a single uniqued string. -/// These are used to efficiently contain a byte sequence for metadata. -/// -class MDString : public Constant { - MDString(const MDString &); // DO NOT IMPLEMENT - void *operator new(size_t, unsigned); // DO NOT IMPLEMENT - 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: - /// size() - The length of this string. - /// - intptr_t size() const { return StrEnd - StrBegin; } - - /// begin() - Pointer to the first byte of the string. - /// - const char *begin() const { return StrBegin; } - - /// end() - Pointer to one byte past the end of the string. - /// - const char *end() const { return StrEnd; } - - /// getType() specialization - Type is always MetadataTy. - /// - inline const Type *getType() const { - return Type::MetadataTy; - } - - /// isNullValue - Return true if this is the value that would be returned by - /// getNullValue. This always returns false because getNullValue will never - /// produce metadata. - virtual bool isNullValue() const { - return false; - } - - virtual void destroyConstant(); - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const MDString *) { return true; } - static bool classof(const Value *V) { - return V->getValueID() == MDStringVal; - } -}; - } // End llvm namespace #endif