mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Mark Type::getPointerTo as const. Unfortunately, this requires a const_cast inside, but at least it makes all methods on Type const. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243844 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -416,7 +416,7 @@ public:
|
|||||||
|
|
||||||
/// getPointerTo - Return a pointer to the current type. This is equivalent
|
/// getPointerTo - Return a pointer to the current type. This is equivalent
|
||||||
/// to PointerType::get(Foo, AddrSpace).
|
/// to PointerType::get(Foo, AddrSpace).
|
||||||
PointerType *getPointerTo(unsigned AddrSpace = 0);
|
PointerType *getPointerTo(unsigned AddrSpace = 0) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// isSizedDerivedType - Derived types like structures and arrays are sized
|
/// isSizedDerivedType - Derived types like structures and arrays are sized
|
||||||
|
@@ -748,8 +748,8 @@ PointerType::PointerType(Type *E, unsigned AddrSpace)
|
|||||||
assert(oldNCT == NumContainedTys && "bitfield written out of bounds?");
|
assert(oldNCT == NumContainedTys && "bitfield written out of bounds?");
|
||||||
}
|
}
|
||||||
|
|
||||||
PointerType *Type::getPointerTo(unsigned addrs) {
|
PointerType *Type::getPointerTo(unsigned addrs) const {
|
||||||
return PointerType::get(this, addrs);
|
return PointerType::get(const_cast<Type*>(this), addrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PointerType::isValidElementType(Type *ElemTy) {
|
bool PointerType::isValidElementType(Type *ElemTy) {
|
||||||
|
Reference in New Issue
Block a user