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

llvm-svn: 234189
This commit is contained in:
David Blaikie 2015-04-06 18:06:06 +00:00
parent 446534adbc
commit 5cf70c0e97
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),