Add short forms of the get*Type methods.
authorChris Lattner <sabre@nondot.org>
Fri, 20 Jul 2001 19:09:11 +0000 (19:09 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 20 Jul 2001 19:09:11 +0000 (19:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DerivedTypes.h

index c83a2d1e4d1a65ff5e5f3b70bc8c85c3ec4aa74a..31a35b618486b1fe9b6e1e85114fb73d35a8983d 100644 (file)
@@ -41,6 +41,9 @@ public:
 
   static const MethodType *getMethodType(const Type *Result, 
                                          const ParamTypes &Params);
+  static const MethodType *get(const Type *Result, const ParamTypes &Params) {
+    return getMethodType(Result, Params);
+  }
 };
 
 
@@ -70,6 +73,9 @@ public:
 
   static const ArrayType *getArrayType(const Type *ElementType, 
                                       int NumElements = -1);
+  static const ArrayType *get(const Type *ElementType, int NumElements = -1) {
+    return getArrayType(ElementType, NumElements);
+  }
 };
 
 class StructType : public Type {
@@ -92,6 +98,9 @@ public:
 
   inline const ElementTypes &getElementTypes() const { return ETypes; }
   static const StructType *getStructType(const ElementTypes &Params);
+  static const StructType *get(const ElementTypes &Params) {
+    return getStructType(Params);
+  }
 };
 
 
@@ -115,6 +124,9 @@ public:
 
 
   static const PointerType *getPointerType(const Type *ElementType);
+  static const PointerType *get(const Type *ElementType) {
+    return getPointerType(ElementType);
+  }
 };
 
 #endif