diff options
-rw-r--r-- | include/llvm/Type.h | 2 | ||||
-rw-r--r-- | lib/VMCore/Type.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h index b8b62a3b81..4a470af9ca 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -430,7 +430,7 @@ public: /// getPointerTo - Return a pointer to the current type. This is equivalent /// to PointerType::get(Foo, AddrSpace). - PointerType *getPointerTo(unsigned AddrSpace = 0) const; + const PointerType *getPointerTo(unsigned AddrSpace = 0) const; private: /// isSizedDerivedType - Derived types like structures and arrays are sized diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index b6423795ca..7afbc682d1 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -951,7 +951,7 @@ PointerType *PointerType::get(const Type *ValueType, unsigned AddressSpace) { return PT; } -PointerType *Type::getPointerTo(unsigned addrs) const { +const PointerType *Type::getPointerTo(unsigned addrs) const { return PointerType::get(this, addrs); } |