aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-10 06:42:02 +0000
committerChris Lattner <sabre@nondot.org>2009-04-10 06:42:02 +0000
commit3584a4758840c1b2d4be8e9b0363bbb32e9374c3 (patch)
tree1aa8321ce0d11570b094140c28700397386118da /lib
parentb9fc36085706c131296e5a7eb91a68f7c8572c31 (diff)
downloadexternal_llvm-3584a4758840c1b2d4be8e9b0363bbb32e9374c3.zip
external_llvm-3584a4758840c1b2d4be8e9b0363bbb32e9374c3.tar.gz
external_llvm-3584a4758840c1b2d4be8e9b0363bbb32e9374c3.tar.bz2
Add a new Type::getPointerTo method, which is shorthand for
llvm::PointerType::get(). Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Type.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 642fc19..edd8cf3 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -1214,6 +1214,10 @@ PointerType *PointerType::get(const Type *ValueType, unsigned AddressSpace) {
return PT;
}
+PointerType *Type::getPointerTo(unsigned addrs) const {
+ return PointerType::get(this, addrs);
+}
+
//===----------------------------------------------------------------------===//
// Derived Type Refinement Functions
//===----------------------------------------------------------------------===//