]> granicus.if.org Git - clang/commitdiff
Use Decl's isImplicit field to indicate whether an ObjCInterfaceDecl is 'ImplicitInte...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 15 Nov 2011 06:20:21 +0000 (06:20 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 15 Nov 2011 06:20:21 +0000 (06:20 +0000)
no need to store it in another field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144624 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclObjC.h
lib/AST/DeclObjC.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp

index 4e65bf049dd63b1f66c7f5a5001dc04882d70603..f340a65dfbc00074c270bd55d9753b731525f9a6 100644 (file)
@@ -572,7 +572,6 @@ class ObjCInterfaceDecl : public ObjCContainerDecl {
   /// true.
   bool InitiallyForwardDecl : 1;
   bool ForwardDecl:1; // declared with @class.
-  bool InternalInterface:1; // true - no @interface for @implementation
 
   /// \brief Indicates that the contents of this Objective-C class will be
   /// completed by the external AST source when required.
@@ -794,8 +793,8 @@ public:
   /// isImplicitInterfaceDecl - check that this is an implicitly declared
   /// ObjCInterfaceDecl node. This is for legacy objective-c @implementation
   /// declaration without an @interface declaration.
-  bool isImplicitInterfaceDecl() const { return InternalInterface; }
-  void setImplicitInterfaceDecl(bool val) { InternalInterface = val; }
+  bool isImplicitInterfaceDecl() const { return isImplicit(); }
+  void setImplicitInterfaceDecl(bool val) { setImplicit(val); }
 
   /// ClassImplementsProtocol - Checks that 'lProto' protocol
   /// has been implemented in IDecl class, its super class or categories (if
index 766b673bde616058ad538d5e6ac00b8eea786594..d4e32a3b5f283339970dcc2f0c4aacc320faf38b 100644 (file)
@@ -654,7 +654,8 @@ ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id,
     TypeForDecl(0), SuperClass(0),
     CategoryList(0), IvarList(0),
     InitiallyForwardDecl(FD), ForwardDecl(FD),
-    InternalInterface(isInternal), ExternallyCompleted(false) {
+    ExternallyCompleted(false) {
+  setImplicit(isInternal);
 }
 
 void ObjCInterfaceDecl::LoadExternalDefinition() const {
index 719f5bc06e11ca403b5642f68e972a2b3201d8f8..3eb867f18e49dc4cf30834e3c0977bd578792770 100644 (file)
@@ -559,7 +559,6 @@ void ASTDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) {
   ID->setIvarList(0);
   ID->InitiallyForwardDecl = Record[Idx++];
   ID->ForwardDecl = Record[Idx++];
-  ID->setImplicitInterfaceDecl(Record[Idx++]);
   ID->setSuperClassLoc(ReadSourceLocation(Record, Idx));
   ID->setLocEnd(ReadSourceLocation(Record, Idx));
 }
index c35d4b0d220651883edf4a0e1f52ec1d5d3b61b3..cb42339cd966974cf95be4441cdaa15354dbf305 100644 (file)
@@ -472,7 +472,6 @@ void ASTDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
   Writer.AddDeclRef(D->getCategoryList(), Record);
   Record.push_back(D->isInitiallyForwardDecl());
   Record.push_back(D->isForwardDecl());
-  Record.push_back(D->isImplicitInterfaceDecl());
   Writer.AddSourceLocation(D->getSuperClassLoc(), Record);
   Writer.AddSourceLocation(D->getLocEnd(), Record);
   Code = serialization::DECL_OBJC_INTERFACE;