forked from OSchip/llvm-project
fix a number of const qualification bugs.
llvm-svn: 49257
This commit is contained in:
parent
c4f02b6bed
commit
157dd0811e
|
@ -125,7 +125,10 @@ public:
|
|||
|
||||
NamedDecl *getMethodContext() const { return MethodContext; }
|
||||
|
||||
ObjCInterfaceDecl *const getClassInterface() const;
|
||||
const ObjCInterfaceDecl *getClassInterface() const;
|
||||
ObjCInterfaceDecl *getClassInterface() {
|
||||
return (ObjCInterfaceDecl*)((ObjCMethodDecl*)this)->getClassInterface();
|
||||
}
|
||||
|
||||
Selector getSelector() const { return SelName; }
|
||||
unsigned getSynthesizedMethodSize() const;
|
||||
|
@ -161,10 +164,12 @@ public:
|
|||
ImplementationControl getImplementationControl() const {
|
||||
return ImplementationControl(DeclImplementation);
|
||||
}
|
||||
Stmt *const getBody() const { return Body; }
|
||||
Stmt *getBody() { return Body; }
|
||||
const Stmt *getBody() const { return Body; }
|
||||
void setBody(Stmt *B) { Body = B; }
|
||||
|
||||
ParmVarDecl *const getSelfDecl() const { return SelfDecl; }
|
||||
const ParmVarDecl *getSelfDecl() const { return SelfDecl; }
|
||||
ParmVarDecl *getSelfDecl() { return SelfDecl; }
|
||||
void setSelfDecl(ParmVarDecl *PVD) { SelfDecl = PVD; }
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
|
@ -655,7 +660,8 @@ public:
|
|||
static ObjCCategoryDecl *Create(ASTContext &C,
|
||||
SourceLocation L, IdentifierInfo *Id);
|
||||
|
||||
ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
|
||||
ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
|
||||
const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
|
||||
void setClassInterface(ObjCInterfaceDecl *IDecl) { ClassInterface = IDecl; }
|
||||
|
||||
void setReferencedProtocolList(ObjCProtocolDecl **List, unsigned NumRPs);
|
||||
|
@ -746,7 +752,8 @@ public:
|
|||
SourceLocation L, IdentifierInfo *Id,
|
||||
ObjCInterfaceDecl *classInterface);
|
||||
|
||||
ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
|
||||
const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
|
||||
ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
|
||||
|
||||
unsigned getNumInstanceMethods() const { return InstanceMethods.size(); }
|
||||
unsigned getNumClassMethods() const { return ClassMethods.size(); }
|
||||
|
@ -844,8 +851,10 @@ public:
|
|||
SourceLocation getLocEnd() const { return EndLoc; }
|
||||
void setLocEnd(SourceLocation LE) { EndLoc = LE; };
|
||||
|
||||
ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
|
||||
ObjCInterfaceDecl *getSuperClass() const { return SuperClass; }
|
||||
const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
|
||||
ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
|
||||
const ObjCInterfaceDecl *getSuperClass() const { return SuperClass; }
|
||||
ObjCInterfaceDecl *getSuperClass() { return SuperClass; }
|
||||
|
||||
void setSuperClass(ObjCInterfaceDecl * superCls) { SuperClass = superCls; }
|
||||
|
||||
|
|
|
@ -1458,10 +1458,11 @@ public:
|
|||
ObjCIvarDecl *getDecl() { return D; }
|
||||
const ObjCIvarDecl *getDecl() const { return D; }
|
||||
virtual SourceRange getSourceRange() const { return SourceRange(Loc); }
|
||||
Expr *const getBase() const { return Base; }
|
||||
const Expr *getBase() const { return Base; }
|
||||
Expr *getBase() { return Base; }
|
||||
void setBase(Expr * base) { Base = base; }
|
||||
const bool isArrow() const { return IsArrow; }
|
||||
const bool isFreeIvar() const { return IsFreeIvar; }
|
||||
bool isArrow() const { return IsArrow; }
|
||||
bool isFreeIvar() const { return IsFreeIvar; }
|
||||
|
||||
SourceLocation getLocation() const { return Loc; }
|
||||
|
||||
|
|
|
@ -1041,7 +1041,8 @@ public:
|
|||
AtThrowLoc = atThrowLoc;
|
||||
}
|
||||
|
||||
Expr *const getThrowExpr() const { return reinterpret_cast<Expr*>(Throw); }
|
||||
const Expr *getThrowExpr() const { return reinterpret_cast<Expr*>(Throw); }
|
||||
Expr *getThrowExpr() { return reinterpret_cast<Expr*>(Throw); }
|
||||
|
||||
virtual SourceRange getSourceRange() const {
|
||||
if (Throw)
|
||||
|
|
|
@ -102,7 +102,7 @@ struct DeclBitVector_Types {
|
|||
return DeclBV[i];
|
||||
}
|
||||
|
||||
const bool getBit(unsigned i) const {
|
||||
bool getBit(unsigned i) const {
|
||||
return DeclBV[i];
|
||||
}
|
||||
|
||||
|
|
|
@ -418,7 +418,7 @@ unsigned ObjCMethodDecl::getSynthesizedMethodSize() const {
|
|||
return length;
|
||||
}
|
||||
|
||||
ObjCInterfaceDecl *const ObjCMethodDecl::getClassInterface() const {
|
||||
const ObjCInterfaceDecl *ObjCMethodDecl::getClassInterface() const {
|
||||
if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(MethodContext))
|
||||
return ID;
|
||||
if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(MethodContext))
|
||||
|
|
Loading…
Reference in New Issue