Rename MethodType to FunctionType, provide a #define
authorChris Lattner <sabre@nondot.org>
Fri, 29 Mar 2002 03:15:32 +0000 (03:15 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 29 Mar 2002 03:15:32 +0000 (03:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2023 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DerivedTypes.h

index dfadaf5e637c49b77765a2fd0cea42a474c4bf97..da972562df6b112e9a376527465075af80128d3e 100644 (file)
@@ -92,7 +92,7 @@ public:
 
 
 
-class MethodType : public DerivedType {
+class FunctionType : public DerivedType {
 public:
   typedef std::vector<PATypeHandle<Type> > ParamTypes;
 private:
@@ -100,16 +100,16 @@ private:
   ParamTypes ParamTys;
   bool isVarArgs;
 
-  MethodType(const MethodType &);                   // Do not implement
-  const MethodType &operator=(const MethodType &);  // Do not implement
+  FunctionType(const FunctionType &);                   // Do not implement
+  const FunctionType &operator=(const FunctionType &);  // Do not implement
 protected:
   // This should really be private, but it squelches a bogus warning
-  // from GCC to make them protected:  warning: `class MethodType' only 
+  // from GCC to make them protected:  warning: `class FunctionType' only 
   // defines private constructors and has no friends
 
   // Private ctor - Only can be created by a static member...
-  MethodType(const Type *Result, const std::vector<const Type*> &Params, 
-             bool IsVarArgs);
+  FunctionType(const Type *Result, const std::vector<const Type*> &Params, 
+               bool IsVarArgs);
 
 public:
 
@@ -130,13 +130,13 @@ public:
   //
   virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
 
-  static MethodType *get(const Type *Result,
-                         const std::vector<const Type*> &Params,
-                        bool isVarArg);
+  static FunctionType *get(const Type *Result,
+                           const std::vector<const Type*> &Params,
+                           bool isVarArg);
 
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:
-  static inline bool classof(const MethodType *T) { return true; }
+  static inline bool classof(const FunctionType *T) { return true; }
   static inline bool classof(const Type *T) {
     return T->getPrimitiveID() == MethodTyID;
   }
@@ -146,7 +146,10 @@ public:
 };
 
 // TODO: FIXME
-#define FunctionType MethodType
+#ifndef MethodType
+#define MethodType FunctionType
+#endif
+
 
 // CompositeType - Common super class of ArrayType, StructType, and PointerType
 //