X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FValue.h;h=5b19435ebaf4c5bb5c2f3b301bbcf12dfac75a27;hb=3756e70af69096a82b367ee9667e7720ca2201e4;hp=84ed037ae77eccadeb2fdea54afdc6f4e1e085dc;hpb=f1d0f7781e766df878bec4e7977fa3204374f394;p=oota-llvm.git diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 84ed037ae77..5b19435ebaf 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -16,6 +16,7 @@ #include "llvm/Use.h" #include "llvm/Support/Casting.h" +#include "llvm/Support/Compiler.h" namespace llvm { @@ -80,8 +81,8 @@ private: friend class ValueHandleBase; ValueName *Name; - void operator=(const Value &); // Do not implement - Value(const Value &); // Do not implement + void operator=(const Value &) LLVM_DELETED_FUNCTION; + Value(const Value &) LLVM_DELETED_FUNCTION; protected: /// printCustom - Value subclasses can override this to implement custom @@ -107,9 +108,10 @@ public: /// All values hold a context through their type. LLVMContext &getContext() const; - // All values can potentially be named... - bool hasName() const { return Name != 0; } + // All values can potentially be named. + bool hasName() const { return Name != 0 && SubclassID != MDStringVal; } ValueName *getValueName() const { return Name; } + void setValueName(ValueName *VN) { Name = VN; } /// getName() - Return a constant reference to the value's name. This is cheap /// and guaranteed to return the same reference as long as the value is not @@ -119,7 +121,7 @@ public: /// setName() - Change the name of the value, choosing a new unique name if /// the provided name is taken. /// - /// \arg Name - The new name; or "" if the value's name should be removed. + /// \param Name The new name; or "" if the value's name should be removed. void setName(const Twine &Name); @@ -255,11 +257,6 @@ public: /// hasValueHandle - Return true if there is a value handle associated with /// this value. bool hasValueHandle() const { return HasValueHandle; } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *) { - return true; // Values are always values. - } /// stripPointerCasts - This method strips off any unneeded pointer casts and /// all-zero GEPs from the specified value, returning the original uncasted