Add some type safety to GlobalObject/GlobalValue - they're always PointerTypes so let's type them that way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2015-04-06 18:06:06 +00:00
parent 05652b6afa
commit e2b7e60b75
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class GlobalObject : public GlobalValue {
GlobalObject(const GlobalObject &) = delete;
protected:
GlobalObject(Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps,
GlobalObject(PointerType *Ty, ValueTy VTy, Use *Ops, unsigned NumOps,
LinkageTypes Linkage, const Twine &Name)
: GlobalValue(Ty, VTy, Ops, NumOps, Linkage, Name), ObjComdat(nullptr) {
setGlobalValueSubClassData(0);

View File

@ -61,7 +61,7 @@ public:
};
protected:
GlobalValue(Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps,
GlobalValue(PointerType *Ty, ValueTy VTy, Use *Ops, unsigned NumOps,
LinkageTypes Linkage, const Twine &Name)
: Constant(Ty, VTy, Ops, NumOps), Linkage(Linkage),
Visibility(DefaultVisibility), UnnamedAddr(0),