summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Type.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp
index 17d24465601..553fa93f585 100644
--- a/llvm/lib/IR/Type.cpp
+++ b/llvm/lib/IR/Type.cpp
@@ -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) {
OpenPOWER on IntegriCloud