diff options
author | Steve Naroff <snaroff@apple.com> | 2009-07-24 17:54:45 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-07-24 17:54:45 +0000 |
commit | f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3 (patch) | |
tree | 5b69e6d4f2903e89a5c70ffaa759820c7833259b /lib/Frontend/PCHWriterStmt.cpp | |
parent | fc514abac21dbd801e2b665a1a24075c5ff62f44 (diff) |
Allow front-end 'isa' access on object's of type 'id'.
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).
Still need back-end CodeGen for ObjCIsaExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterStmt.cpp')
-rw-r--r-- | lib/Frontend/PCHWriterStmt.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp index ae606b6b41..3e4c6f5fed 100644 --- a/lib/Frontend/PCHWriterStmt.cpp +++ b/lib/Frontend/PCHWriterStmt.cpp @@ -97,6 +97,7 @@ namespace { void VisitObjCKVCRefExpr(ObjCKVCRefExpr *E); void VisitObjCMessageExpr(ObjCMessageExpr *E); void VisitObjCSuperExpr(ObjCSuperExpr *E); + void VisitObjCIsaExpr(ObjCIsaExpr *E); // Objective-C Statements void VisitObjCForCollectionStmt(ObjCForCollectionStmt *); @@ -416,6 +417,14 @@ void PCHStmtWriter::VisitMemberExpr(MemberExpr *E) { Code = pch::EXPR_MEMBER; } +void PCHStmtWriter::VisitObjCIsaExpr(ObjCIsaExpr *E) { + VisitExpr(E); + Writer.WriteSubStmt(E->getBase()); + Writer.AddSourceLocation(E->getIsaMemberLoc(), Record); + Record.push_back(E->isArrow()); + Code = pch::EXPR_OBJC_ISA; +} + void PCHStmtWriter::VisitCastExpr(CastExpr *E) { VisitExpr(E); Writer.WriteSubStmt(E->getSubExpr()); |