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 | 09c1b3d8585337c75d0a84176d0ab6f4c26a64e0 (patch) | |
tree | 43eee30a60e1f522119a1462e05d968b4fa09376 /clang/lib/Serialization/ASTWriter.cpp | |
parent | 2a1df883d0cf266e359e79887b5f711dfcc2b294 (diff) | |
download | bcm5719-llvm-09c1b3d8585337c75d0a84176d0ab6f4c26a64e0.tar.gz bcm5719-llvm-09c1b3d8585337c75d0a84176d0ab6f4c26a64e0.zip |
[PCH] In ASTWriter::WriteChainedObjCCategories use getDeclID since the decls
should have been already emitted.
llvm-svn: 144519
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 667b3a58ddc..8f79fa4c492 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/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); } |