mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +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
llvm-svn: 243844
This commit is contained in:
parent
e78ee7e851
commit
483b6f6b60
@ -416,7 +416,7 @@ public:
|
||||
|
||||
/// 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
|
||||
|
@ -748,8 +748,8 @@ PointerType::PointerType(Type *E, unsigned AddrSpace)
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user