diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-09-10 21:29:41 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-09-10 21:29:41 +0000 |
commit | b1f0f8a086e46afd3385fbd1ae680668f59dde58 (patch) | |
tree | b57a8d762ddaa23dea0cd92e92f9f46120533d85 /include/clang/Serialization | |
parent | 2e49ba2061833c78384d8a1a13d0127f31330425 (diff) |
Avoid a couple of assertions when preprocessing with modules
1. We were hitting the NextIsPrevious assertion because we were trying
to merge decl chains that were independent of each other because we had
no Sema object to allow them to find existing decls. This is fixed by
delaying loading the "preloaded" decls until Sema is available.
2. We were trying to get identifier info from an annotation token, which
asserts. The fix is to special-case the module annotations in the
preprocessed output printer.
Fixed in a single commit because when you hit 1 you almost invariably
hit 2 as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 12d27f105f..1b3d46a6e4 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -2076,9 +2076,9 @@ public: /// \brief Retrieve the AST context that this AST reader supplements. ASTContext &getContext() { return Context; } - // \brief Contains declarations that were loaded before we have + // \brief Contains the IDs for declarations that were requested before we have // access to a Sema object. - SmallVector<NamedDecl *, 16> PreloadedDecls; + SmallVector<uint64_t, 16> PreloadedDeclIDs; /// \brief Retrieve the semantic analysis object used to analyze the /// translation unit in which the precompiled header is being |