summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-10-07 07:35:19 +0000
committerDuncan Sands <baldrick@free.fr>2009-10-07 07:35:19 +0000
commit986742a14ff8e694feb705c5c33c725b19ea157b (patch)
treeed17f559e1b9a0a839a5357041c8bedf2c216fa0
parent8c6066d0210367f3f6009e2b09ff46660f868e02 (diff)
downloadbcm5719-llvm-986742a14ff8e694feb705c5c33c725b19ea157b.tar.gz
bcm5719-llvm-986742a14ff8e694feb705c5c33c725b19ea157b.zip
Make getPointerTo return a const PointerType* rather than
an unqualified PointerType* because it seems more correct. llvm-svn: 83454
-rw-r--r--llvm/include/llvm/Type.h2
-rw-r--r--llvm/lib/VMCore/Type.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Type.h b/llvm/include/llvm/Type.h
index b8b62a3b819..4a470af9ca5 100644
--- a/llvm/include/llvm/Type.h
+++ b/llvm/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/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp
index b6423795cad..7afbc682d15 100644
--- a/llvm/lib/VMCore/Type.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud