]> granicus.if.org Git - clang/commit
Substantially alter the design of the Objective C type AST by introducing
authorJohn McCall <rjmccall@apple.com>
Sat, 15 May 2010 11:32:37 +0000 (11:32 +0000)
committerJohn McCall <rjmccall@apple.com>
Sat, 15 May 2010 11:32:37 +0000 (11:32 +0000)
commitc12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e
treef6b386f56c0925da061036cb04ba79a0bff05d91
parentd86c477fb5d3fc34864afecbbb5443da9355e8fb
Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
  one of {primitive-id, primitive-Class, user-defined @class}
with
  a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared).  ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType.  Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet.  Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
44 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/CanonicalType.h
include/clang/AST/RecursiveASTVisitor.h
include/clang/AST/Type.h
include/clang/AST/TypeLoc.h
include/clang/AST/TypeLocBuilder.h
include/clang/AST/TypeNodes.def
include/clang/Frontend/PCHBitCodes.h
lib/AST/ASTContext.cpp
lib/AST/ASTImporter.cpp
lib/AST/Expr.cpp
lib/AST/Type.cpp
lib/AST/TypePrinter.cpp
lib/Checker/CFRefCount.cpp
lib/Checker/GRExprEngine.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CGObjCGNU.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CodeGenTypes.cpp
lib/CodeGen/Mangle.cpp
lib/Frontend/PCHReader.cpp
lib/Frontend/PCHWriter.cpp
lib/Index/Analyzer.cpp
lib/Index/ResolveLocation.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaCodeComplete.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclObjC.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprObjC.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaObjCProperty.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaStmt.cpp
lib/Sema/SemaTemplateDeduction.cpp
lib/Sema/SemaType.cpp
lib/Sema/TreeTransform.h
test/SemaObjCXX/deduction.mm
tools/libclang/CIndex.cpp
tools/libclang/CXTypes.cpp