Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51943 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/TranslationUnit.cpp b/lib/AST/TranslationUnit.cpp
index f1505b0..f8416f1 100644
--- a/lib/AST/TranslationUnit.cpp
+++ b/lib/AST/TranslationUnit.cpp
@@ -124,16 +124,13 @@
Sezr.EnterBlock(BasicMetadataBlock);
- // Block for SourceManager, LangOptions, and Target. Allows easy skipping
+ // Block for SourceManager and Target. Allows easy skipping
// around to the block for the Selectors during deserialization.
Sezr.EnterBlock();
// Emit the SourceManager.
Sezr.Emit(Context->getSourceManager());
-
- // Emit the LangOptions.
- Sezr.Emit(LangOpts);
-
+
// Emit the Target.
Sezr.EmitPtr(&Context->Target);
Sezr.EmitCStr(Context->Target.getTargetTriple());
@@ -211,10 +208,7 @@
// Read the SourceManager.
SourceManager::CreateAndRegister(Dezr,FMgr);
-
- // Read the LangOptions.
- TU->LangOpts.Read(Dezr);
-
+
{ // Read the TargetInfo.
llvm::SerializedPtrID PtrID = Dezr.ReadPtrID();
char* triple = Dezr.ReadCStr(NULL,0,true);