git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243844
91177308-0d34-0410-b5e6-
96231b3b80d8
/// getPointerTo - Return a pointer to the current type. This is equivalent
/// to PointerType::get(Foo, AddrSpace).
- PointerType *getPointerTo(unsigned AddrSpace = 0);
+ PointerType *getPointerTo(unsigned AddrSpace = 0) const;
private:
/// isSizedDerivedType - Derived types like structures and arrays are sized
assert(oldNCT == NumContainedTys && "bitfield written out of bounds?");
}
-PointerType *Type::getPointerTo(unsigned addrs) {
- return PointerType::get(this, addrs);
+PointerType *Type::getPointerTo(unsigned addrs) const {
+ return PointerType::get(const_cast<Type*>(this), addrs);
}
bool PointerType::isValidElementType(Type *ElemTy) {