[cfe-commits] r41860 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang/AST/Decl.h

Fariborz Jahanian fjahanian at apple.com
Tue Sep 11 11:45:56 PDT 2007


Author: fjahanian
Date: Tue Sep 11 13:45:55 2007
New Revision: 41860

URL: http://llvm.org/viewvc/llvm-project?rev=41860&view=rev
Log:
Change ObjcMethodDecl class derivation.

Modified:
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/include/clang/AST/Decl.h

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=41860&r1=41859&r2=41860&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Tue Sep 11 13:45:55 2007
@@ -671,6 +671,7 @@
 		08FB7793FE84155DC02AAC07 /* Project object */ = {
 			isa = PBXProject;
 			buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
+			compatibilityVersion = "Xcode 2.4";
 			hasScannedForEncodings = 1;
 			mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
 			projectDirPath = "";

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=41860&r1=41859&r2=41860&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Tue Sep 11 13:45:55 2007
@@ -560,32 +560,33 @@
 
 /// 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 @@
   /// List of attributes for this method declaration.
   AttributeList *MethodAttrs;
 
+  /// instance (true) or class (false) method.
   bool IsInstance : 1;
 };
 





More information about the cfe-commits mailing list