diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-14 04:52:24 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-14 04:52:24 +0000 |
commit | 67bc4ba9894506c461aeff11302c2d2471b82273 (patch) | |
tree | 9fe14b0e1e1f3e67b02142340a56694a8dde5c48 /lib/Serialization/ASTWriter.cpp | |
parent | 16ac8be58801d45358497e90a2f82bc155da8a44 (diff) |
[PCH] In ASTWriter::WriteChainedObjCCategories use getDeclID since the decls
should have been already emitted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 667b3a58dd..8f79fa4c49 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -2992,8 +2992,7 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, } } - // Resolve any declaration pointers within the declaration updates block and - // chained Objective-C categories block to declaration IDs. + // Resolve any declaration pointers within the declaration updates block. ResolveDeclUpdatesBlocks(); // Form the record of special types. @@ -3255,13 +3254,13 @@ void ASTWriter::WriteChainedObjCCategories() { if (isRewritten(Data.Interface)) continue; + assert(Data.Interface->getCategoryList()); serialization::DeclID HeadCatID = getDeclID(Data.Interface->getCategoryList()); - assert(HeadCatID != 0 && "Category not written ?"); - Record.push_back(GetDeclRef(Data.Interface)); + Record.push_back(getDeclID(Data.Interface)); Record.push_back(HeadCatID); - Record.push_back(GetDeclRef(Data.TailCategory)); + Record.push_back(getDeclID(Data.TailCategory)); } Stream.EmitRecord(OBJC_CHAINED_CATEGORIES, Record); } @@ -4119,7 +4118,7 @@ void ASTWriter::AddedObjCCategoryToInterface(const ObjCCategoryDecl *CatD, return; // We already recorded that the tail of a category chain should be // attached to an interface. - ChainedObjCCategoriesData Data = { IFD, CatD, 0, 0 }; + ChainedObjCCategoriesData Data = { IFD, CatD }; LocalChainedObjCCategories.push_back(Data); } |