X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FGlobalValue.h;h=63dc4ab6bae05be4a26a7a394e4774f1b23a76e5;hb=8c74f7f2991a10977fd5a003b2901b56eb2e19a8;hp=b184b8e449713fd2aa0246759dc049dda65caac5;hpb=13fb0db0c26ec498cf8ffb0f9943d28962d4ced7;p=oota-llvm.git diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index b184b8e4497..63dc4ab6bae 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -57,7 +57,7 @@ public: }; protected: - GlobalValue(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps, + GlobalValue(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps, LinkageTypes linkage, const Twine &Name) : Constant(ty, vty, Ops, NumOps), Parent(0), Linkage(linkage), Visibility(DefaultVisibility), Alignment(0), @@ -106,8 +106,8 @@ public: bool use_empty_except_constants(); /// getType - Global values are always pointers. - inline const PointerType *getType() const { - return reinterpret_cast(User::getType()); + inline PointerType *getType() const { + return reinterpret_cast(User::getType()); } static LinkageTypes getLinkOnceLinkage(bool ODR) { @@ -258,16 +258,12 @@ public: /// @} - /// Override from Constant class. No GlobalValue's are null values so this - /// always returns false. - virtual bool isNullValue() const { return false; } - /// Override from Constant class. virtual void destroyConstant(); /// isDeclaration - Return true if the primary definition of this global - /// value is outside of the current translation unit... - virtual bool isDeclaration() const = 0; + /// value is outside of the current translation unit. + bool isDeclaration() const; /// removeFromParent - This method unlinks 'this' from the containing module, /// but does not delete it.