summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitbc8848f76fe0096ca5a8cc91134ffe8b22f1c7e1 (patch)
treeb74e0667be9e8c9536a45ea0b51bd0800d2ee106 /llvm/lib
parentdadf250598950abf6cfab7053c3df19489d9bec5 (diff)
downloadbcm5719-llvm-bc8848f76fe0096ca5a8cc91134ffe8b22f1c7e1.tar.gz
bcm5719-llvm-bc8848f76fe0096ca5a8cc91134ffe8b22f1c7e1.zip
Add a new Type::getPointerTo method, which is shorthand for
llvm::PointerType::get(). Patch by Anders Johnsen! llvm-svn: 68772
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Type.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp
index 642fc1907ef..edd8cf35022 100644
--- a/llvm/lib/VMCore/Type.cpp
+++ b/llvm/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
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud