[llvm-commits] [llvm] r83454 - in /llvm/trunk: include/llvm/Type.h lib/VMCore/Type.cpp
Duncan Sands
baldrick at free.fr
Wed Oct 7 00:35:20 PDT 2009
Author: baldrick
Date: Wed Oct 7 02:35:19 2009
New Revision: 83454
URL: http://llvm.org/viewvc/llvm-project?rev=83454&view=rev
Log:
Make getPointerTo return a const PointerType* rather than
an unqualified PointerType* because it seems more correct.
Modified:
llvm/trunk/include/llvm/Type.h
llvm/trunk/lib/VMCore/Type.cpp
Modified: llvm/trunk/include/llvm/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=83454&r1=83453&r2=83454&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Type.h (original)
+++ llvm/trunk/include/llvm/Type.h Wed Oct 7 02:35:19 2009
@@ -430,7 +430,7 @@
/// 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
Modified: llvm/trunk/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=83454&r1=83453&r2=83454&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Type.cpp (original)
+++ llvm/trunk/lib/VMCore/Type.cpp Wed Oct 7 02:35:19 2009
@@ -951,7 +951,7 @@
return PT;
}
-PointerType *Type::getPointerTo(unsigned addrs) const {
+const PointerType *Type::getPointerTo(unsigned addrs) const {
return PointerType::get(this, addrs);
}
More information about the llvm-commits
mailing list