]> granicus.if.org Git - clang/commitdiff
Change ObjcMethodDecl class derivation.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 11 Sep 2007 18:45:55 +0000 (18:45 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 11 Sep 2007 18:45:55 +0000 (18:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41860 91177308-0d34-0410-b5e6-96231b3b80d8

clang.xcodeproj/project.pbxproj
include/clang/AST/Decl.h

index f0f4c3f0b957f8f6ef2e463556fe10f832bf59b1..0ca23958c7d4da21dd41f84d48841bdb04ff2f4c 100644 (file)
                08FB7793FE84155DC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
                        projectDirPath = "";
index 838bad4b5f81f6c61b5823e3574c16f1d46048c8..644c0f7e43aa23fef1337cb71d7c4c7fc1bd4c96 100644 (file)
@@ -560,32 +560,33 @@ public:
 
 /// ObjcMethodDecl - An instance of this class is created to represent an instance
 /// or class method declaration.
-class ObjcMethodDecl : public ValueDecl {
+class ObjcMethodDecl : public Decl {
 public:
   ObjcMethodDecl(SourceLocation L, IdentifierInfo *Id, QualType T,
-                bool isInstance = true, Decl *PrevDecl = 0)
-    : ValueDecl(ObjcMethod, L, Id, T, PrevDecl), ParamInfo(0), 
-      MethodAttrs(0), IsInstance(isInstance) {}
+                AttributeList *M = 0, bool isInstance = true, 
+                Decl *PrevDecl = 0)
+    : Decl(ObjcMethod, L, Id, PrevDecl), MethodDeclType(T), ParamInfo(0), 
+      MethodAttrs(M), IsInstance(isInstance) {}
 
   virtual ~ObjcMethodDecl();
-  unsigned getNumParams() const;
-  ParmVarDecl *getParamDecl(unsigned i) {
-    assert(i < getNumParams() && "Illegal param #");
+  QualType getMethodType() const { return MethodDeclType; }
+  unsigned getNumMethodParams() const;
+  ParmVarDecl *getMethodParamDecl(unsigned i) {
+    assert(i < getNumMethodParams() && "Illegal param #");
     return ParamInfo[i];
   }
   void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams);
 
+  AttributeList *getMethodAttrs() const {return MethodAttrs;}
   bool isInstance() const { return IsInstance; }
-  QualType getResultType() const { return getType(); }
   
-  void setMethodAttrs(AttributeList *attrs) {MethodAttrs = attrs;}
-  AttributeList *getMethodAttrs() const {return MethodAttrs;}
-
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) { return D->getKind() == ObjcMethod; }
   static bool classof(const ObjcMethodDecl *D) { return true; }
 
 private:
+  // Type of this method.
+  QualType MethodDeclType;
   /// ParamInfo - new[]'d array of pointers to VarDecls for the formal
   /// parameters of this Method.  This is null if there are no formals.  
   ParmVarDecl **ParamInfo;
@@ -593,6 +594,7 @@ private:
   /// List of attributes for this method declaration.
   AttributeList *MethodAttrs;
 
+  /// instance (true) or class (false) method.
   bool IsInstance : 1;
 };