summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-07-27 05:40:23 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-07-27 05:40:23 +0000
commit9b88a4cdf48d714751ed6a02245d7bdf023072f9 (patch)
tree2615ab41bfb4b75d715439721ff722ca76dfbdae /clang/lib/Serialization/ASTReader.cpp
parent94abbbd6abc411697a346c2f36f67d5ff3f38f27 (diff)
downloadbcm5719-llvm-9b88a4cdf48d714751ed6a02245d7bdf023072f9.tar.gz
bcm5719-llvm-9b88a4cdf48d714751ed6a02245d7bdf023072f9.zip
[modules] Add an assert for redeclarations that we never added to their redecl
chain and fix the cases where it fires. * Handle the __va_list_tag as a predefined decl. Previously we failed to merge sometimes it because it's not visible to name lookup. (In passing, remove redundant __va_list_tag typedefs that we were creating for some ABIs. These didn't affect the mangling or representation of the type.) * For Decls derived from Redeclarable that are not in fact redeclarable (implicit params, function params, ObjC type parameters), remove them from the list of expected redeclarable decls. llvm-svn: 243259
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 520c3418b26..0c4dab4065b 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -5762,10 +5762,6 @@ QualType ASTReader::GetType(TypeID ID) {
T = Context.ARCUnbridgedCastTy;
break;
- case PREDEF_TYPE_VA_LIST_TAG:
- T = Context.getVaListTagType();
- break;
-
case PREDEF_TYPE_BUILTIN_FN:
T = Context.BuiltinFnTy;
break;
@@ -6078,6 +6074,9 @@ static Decl *getPredefinedDecl(ASTContext &Context, PredefinedDeclIDs ID) {
case PREDEF_DECL_BUILTIN_VA_LIST_ID:
return Context.getBuiltinVaListDecl();
+ case PREDEF_DECL_VA_LIST_TAG:
+ return Context.getVaListTagDecl();
+
case PREDEF_DECL_EXTERN_C_CONTEXT_ID:
return Context.getExternCContextDecl();
}
@@ -8142,6 +8141,8 @@ void ASTReader::finishPendingActions() {
assert(PendingDeclChainsKnown.empty());
PendingDeclChains.clear();
+ assert(RedeclsDeserialized.empty() && "some redecls not wired up");
+
// Make the most recent of the top-level declarations visible.
for (TopLevelDeclsMap::iterator TLD = TopLevelDecls.begin(),
TLDEnd = TopLevelDecls.end(); TLD != TLDEnd; ++TLD) {
OpenPOWER on IntegriCloud