diff options
author | John McCall <rjmccall@apple.com> | 2011-01-19 06:33:43 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-01-19 06:33:43 +0000 |
commit | f4c7371fb1d3cebcfb40abad4537bb82515704ea (patch) | |
tree | 1ef9169970f5c94e0694b1b1b1c6d9acffc96c74 /lib/Rewrite/RewriteObjC.cpp | |
parent | f7e22d86167a9fbb42c5ab5b349a34d123a2e2b5 (diff) |
Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | lib/Rewrite/RewriteObjC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp index 985a6a29f5..488ee6044e 100644 --- a/lib/Rewrite/RewriteObjC.cpp +++ b/lib/Rewrite/RewriteObjC.cpp @@ -472,7 +472,7 @@ namespace { void RewriteObjC::RewriteBlocksInFunctionProtoType(QualType funcType, NamedDecl *D) { - if (FunctionProtoType *fproto + if (const FunctionProtoType *fproto = dyn_cast<FunctionProtoType>(funcType.IgnoreParens())) { for (FunctionProtoType::arg_type_iterator I = fproto->arg_type_begin(), E = fproto->arg_type_end(); I && (I != E); ++I) @@ -1410,7 +1410,7 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV, const Expr *BaseExpr = IV->getBase(); if (CurMethodDef) { if (BaseExpr->getType()->isObjCObjectPointerType()) { - ObjCInterfaceType *iFaceDecl = + const ObjCInterfaceType *iFaceDecl = dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType()); assert(iFaceDecl && "RewriteObjCIvarRefExpr - iFaceDecl is null"); // lookup which class implements the instance variable. @@ -1457,7 +1457,7 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV, // Explicit ivar refs need to have a cast inserted. // FIXME: consider sharing some of this code with the code above. if (BaseExpr->getType()->isObjCObjectPointerType()) { - ObjCInterfaceType *iFaceDecl = + const ObjCInterfaceType *iFaceDecl = dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType()); // lookup which class implements the instance variable. ObjCInterfaceDecl *clsDeclared = 0; |