diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-06-04 15:55:15 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-06-04 15:55:15 +0000 |
| commit | b147ad105104ce1b48b0233ad9004605f4cf772f (patch) | |
| tree | ccf969de8adb92b4805419d567d4499e82e6e652 /clang/lib/AST/ASTContext.cpp | |
| parent | a6bb22e9bccb677afff3cbcc2de18d016e3c3d0c (diff) | |
| download | bcm5719-llvm-b147ad105104ce1b48b0233ad9004605f4cf772f.tar.gz bcm5719-llvm-b147ad105104ce1b48b0233ad9004605f4cf772f.zip | |
Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers.
llvm-svn: 51943
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 8 |
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); |

