summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index a87efa7425e..2fe1f515c0c 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1701,6 +1701,7 @@ bool ASTContext::typesAreCompatible(QualType LHS_NC, QualType RHS_NC) {
/// Emit - Serialize an ASTContext object to Bitcode.
void ASTContext::Emit(llvm::Serializer& S) const {
+ S.Emit(LangOpts);
S.EmitRef(SourceMgr);
S.EmitRef(Target);
S.EmitRef(Idents);
@@ -1720,6 +1721,11 @@ void ASTContext::Emit(llvm::Serializer& S) const {
}
ASTContext* ASTContext::Create(llvm::Deserializer& D) {
+
+ // Read the language options.
+ LangOptions LOpts;
+ LOpts.Read(D);
+
SourceManager &SM = D.ReadRef<SourceManager>();
TargetInfo &t = D.ReadRef<TargetInfo>();
IdentifierTable &idents = D.ReadRef<IdentifierTable>();
@@ -1727,7 +1733,7 @@ ASTContext* ASTContext::Create(llvm::Deserializer& D) {
unsigned size_reserve = D.ReadInt();
- ASTContext* A = new ASTContext(SM,t,idents,sels,size_reserve);
+ ASTContext* A = new ASTContext(LOpts, SM, t, idents, sels, size_reserve);
for (unsigned i = 0; i < size_reserve; ++i)
Type::Create(*A,i,D);
OpenPOWER on IntegriCloud