aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTContext.cpp2
-rw-r--r--lib/Frontend/ASTUnit.cpp12
-rw-r--r--lib/Lex/Preprocessor.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 75a573e301..3406be552c 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -212,7 +212,7 @@ static const LangAS::Map &getAddressSpaceMap(const TargetInfo &T,
}
}
-ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM,
+ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
const TargetInfo &t,
IdentifierTable &idents, SelectorTable &sels,
Builtin::Context &builtins,
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index eee5b1a7cc..b09c435c8a 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -572,7 +572,6 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
// Gather Info for preprocessor construction later on.
- LangOptions LangInfo;
HeaderSearch &HeaderInfo = *AST->HeaderInfo.get();
std::string TargetTriple;
std::string Predefines;
@@ -587,8 +586,8 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
llvm::CrashRecoveryContextCleanupRegistrar<ASTReader>
ReaderCleanup(Reader.get());
- Reader->setListener(new ASTInfoCollector(LangInfo, HeaderInfo, TargetTriple,
- Predefines, Counter));
+ Reader->setListener(new ASTInfoCollector(AST->ASTFileLangOpts, HeaderInfo,
+ TargetTriple, Predefines, Counter));
switch (Reader->ReadAST(Filename, serialization::MK_MainFile)) {
case ASTReader::Success:
@@ -615,8 +614,9 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
TargetOpts.Triple = TargetTriple;
AST->Target = TargetInfo::CreateTargetInfo(AST->getDiagnostics(),
TargetOpts);
- AST->PP = new Preprocessor(AST->getDiagnostics(), LangInfo, *AST->Target,
- AST->getSourceManager(), HeaderInfo, *AST);
+ AST->PP = new Preprocessor(AST->getDiagnostics(), AST->ASTFileLangOpts,
+ *AST->Target, AST->getSourceManager(), HeaderInfo,
+ *AST);
Preprocessor &PP = *AST->PP;
PP.setPredefines(Reader->getSuggestedPredefines());
@@ -625,7 +625,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
// Create and initialize the ASTContext.
- AST->Ctx = new ASTContext(LangInfo,
+ AST->Ctx = new ASTContext(AST->ASTFileLangOpts,
AST->getSourceManager(),
*AST->Target,
PP.getIdentifierTable(),
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index b285660c08..f00349081c 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -49,7 +49,7 @@ using namespace clang;
//===----------------------------------------------------------------------===//
ExternalPreprocessorSource::~ExternalPreprocessorSource() { }
-Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts,
+Preprocessor::Preprocessor(Diagnostic &diags, LangOptions &opts,
const TargetInfo &target, SourceManager &SM,
HeaderSearch &Headers, ModuleLoader &TheModuleLoader,
IdentifierInfoLookup* IILookup,