summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-09-11 18:45:55 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-09-11 18:45:55 +0000
commitcfc3e4d346689da6fcac168701a859073b589fb7 (patch)
treef9c4db5f186371cb304b03f136a3d0a57c091503
parent216788aacb384ddf818316a0dd7f762b34f72449 (diff)
downloadbcm5719-llvm-cfc3e4d346689da6fcac168701a859073b589fb7.tar.gz
bcm5719-llvm-cfc3e4d346689da6fcac168701a859073b589fb7.zip
Change ObjcMethodDecl class derivation.
llvm-svn: 41860
-rw-r--r--clang/clang.xcodeproj/project.pbxproj1
-rw-r--r--clang/include/clang/AST/Decl.h24
2 files changed, 14 insertions, 11 deletions
diff --git a/clang/clang.xcodeproj/project.pbxproj b/clang/clang.xcodeproj/project.pbxproj
index f0f4c3f0b95..0ca23958c7d 100644
--- a/clang/clang.xcodeproj/project.pbxproj
+++ b/clang/clang.xcodeproj/project.pbxproj
@@ -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 = "";
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 838bad4b5f8..644c0f7e43a 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -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;
};
OpenPOWER on IntegriCloud