summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-10-16 21:36:54 +0000
committerSteve Naroff <snaroff@apple.com>2007-10-16 21:36:54 +0000
commitd2754264495998882bc95c7d4a8ca11ecb43b84e (patch)
tree4dadf1574a2765cc6aa602ba4e547b3e5e2fe914
parent5a2fe28acaa6fda416ca263ba5f9afb7c3801b5a (diff)
downloadbcm5719-llvm-d2754264495998882bc95c7d4a8ca11ecb43b84e.tar.gz
bcm5719-llvm-d2754264495998882bc95c7d4a8ca11ecb43b84e.zip
Remove ObjcMethodDecl::getNumMethodParams/getMethodParamDecl, they aren't used/needed.
Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl. llvm-svn: 43045
-rw-r--r--clang/Sema/SemaDecl.cpp4
-rw-r--r--clang/Sema/SemaExpr.cpp6
-rw-r--r--clang/include/clang/AST/DeclObjC.h10
3 files changed, 8 insertions, 12 deletions
diff --git a/clang/Sema/SemaDecl.cpp b/clang/Sema/SemaDecl.cpp
index 232c5ba2e2e..bb100c67ce4 100644
--- a/clang/Sema/SemaDecl.cpp
+++ b/clang/Sema/SemaDecl.cpp
@@ -1760,8 +1760,8 @@ void Sema::ActOnFields(Scope* S,
/// TODO: Handle protocol list; such as id<p1,p2> in type comparisons
bool Sema:: MatchTwoMethodDeclarations(const ObjcMethodDecl *Method,
const ObjcMethodDecl *PrevMethod) {
- if (Method->getMethodType().getCanonicalType() !=
- PrevMethod->getMethodType().getCanonicalType())
+ if (Method->getResultType().getCanonicalType() !=
+ PrevMethod->getResultType().getCanonicalType())
return false;
for (int i = 0; i < Method->getNumParams(); i++) {
ParmVarDecl *ParamDecl = Method->getParamDecl(i);
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp
index 082b7182b9b..896b318d5df 100644
--- a/clang/Sema/SemaExpr.cpp
+++ b/clang/Sema/SemaExpr.cpp
@@ -1944,7 +1944,7 @@ Sema::ExprResult Sema::ActOnClassMessage(
SourceRange(lbrac, rbrac));
returnType = GetObjcIdType();
} else {
- returnType = Method->getMethodType();
+ returnType = Method->getResultType();
}
// Expr *RExpr = global reference to the class symbol...
Expr **ArgExprs = reinterpret_cast<Expr **>(Args);
@@ -1972,7 +1972,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(
SourceRange(lbrac, rbrac));
returnType = GetObjcIdType();
} else {
- returnType = Method->getMethodType();
+ returnType = Method->getResultType();
}
} else {
// FIXME (snaroff): checking in this code from Patrick. Needs to be
@@ -1995,7 +1995,7 @@ Sema::ExprResult Sema::ActOnInstanceMessage(
SourceRange(lbrac, rbrac));
returnType = GetObjcIdType();
} else {
- returnType = Method->getMethodType();
+ returnType = Method->getResultType();
}
}
Expr **ArgExprs = reinterpret_cast<Expr **>(Args);
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h
index 9df6a430679..bbab58a324f 100644
--- a/clang/include/clang/AST/DeclObjC.h
+++ b/clang/include/clang/AST/DeclObjC.h
@@ -231,14 +231,10 @@ public:
ParamInfo(paramInfo), NumMethodParams(numParams),
MethodAttrs(M) {}
virtual ~ObjcMethodDecl();
- Selector getSelector() const { return SelName; }
- QualType getMethodType() const { return MethodDeclType; }
- unsigned getNumMethodParams() const { return NumMethodParams; }
- ParmVarDecl *getMethodParamDecl(unsigned i) {
- assert(i < getNumMethodParams() && "Illegal param #");
- return ParamInfo[i];
- }
+ Selector getSelector() const { return SelName; }
+ QualType getResultType() const { return MethodDeclType; }
+
int getNumParams() const { return NumMethodParams; }
ParmVarDecl *getParamDecl(int i) const {
assert(i < getNumParams() && "Illegal param #");
OpenPOWER on IntegriCloud