summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp4
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp4
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp26
3 files changed, 16 insertions, 18 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 42352dfe512..0365761c840 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -167,8 +167,8 @@ CompilerInstance::createPreprocessor(Diagnostic &Diags,
FileManager &FileMgr) {
// Create a PTH manager if we are using some form of a token cache.
PTHManager *PTHMgr = 0;
- if (!PPOpts.getTokenCache().empty())
- PTHMgr = PTHManager::Create(PPOpts.getTokenCache(), Diags);
+ if (!PPOpts.TokenCache.empty())
+ PTHMgr = PTHManager::Create(PPOpts.TokenCache, Diags);
// FIXME: Don't fail like this.
if (Diags.hasErrorOccurred())
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 2629b446f07..ff63a0dab5f 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -90,10 +90,10 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
goto failure;
/// Use PCH?
- if (!CI.getPreprocessorOpts().getImplicitPCHInclude().empty()) {
+ if (!CI.getPreprocessorOpts().ImplicitPCHInclude.empty()) {
assert(hasPCHSupport() && "This action does not have PCH support!");
CI.createPCHExternalASTSource(
- CI.getPreprocessorOpts().getImplicitPCHInclude());
+ CI.getPreprocessorOpts().ImplicitPCHInclude);
if (!CI.getASTContext().getExternalSource())
goto failure;
}
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 9648620ea07..4ee286dd265 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -477,7 +477,7 @@ void clang::InitializePreprocessor(Preprocessor &PP,
LineDirective, LineDirective+strlen(LineDirective));
// Install things like __POWERPC__, __GNUC__, etc into the macro table.
- if (InitOpts.getUsePredefines())
+ if (InitOpts.UsePredefines)
InitializePredefinedMacros(PP.getTargetInfo(), PP.getLangOptions(),
PredefineBuffer);
@@ -488,27 +488,25 @@ void clang::InitializePreprocessor(Preprocessor &PP,
LineDirective, LineDirective+strlen(LineDirective));
// Process #define's and #undef's in the order they are given.
- for (PreprocessorOptions::macro_iterator I = InitOpts.macro_begin(),
- E = InitOpts.macro_end(); I != E; ++I) {
- if (I->second) // isUndef
- UndefineBuiltinMacro(PredefineBuffer, I->first.c_str());
+ for (unsigned i = 0, e = InitOpts.Macros.size(); i != e; ++i) {
+ if (InitOpts.Macros[i].second) // isUndef
+ UndefineBuiltinMacro(PredefineBuffer, InitOpts.Macros[i].first.c_str());
else
- DefineBuiltinMacro(PredefineBuffer, I->first.c_str());
+ DefineBuiltinMacro(PredefineBuffer, InitOpts.Macros[i].first.c_str());
}
// If -imacros are specified, include them now. These are processed before
// any -include directives.
- for (PreprocessorOptions::imacro_iterator I = InitOpts.imacro_begin(),
- E = InitOpts.imacro_end(); I != E; ++I)
- AddImplicitIncludeMacros(PredefineBuffer, *I);
+ for (unsigned i = 0, e = InitOpts.MacroIncludes.size(); i != e; ++i)
+ AddImplicitIncludeMacros(PredefineBuffer, InitOpts.MacroIncludes[i]);
// Process -include directives.
- for (PreprocessorOptions::include_iterator I = InitOpts.include_begin(),
- E = InitOpts.include_end(); I != E; ++I) {
- if (*I == InitOpts.getImplicitPTHInclude())
- AddImplicitIncludePTH(PredefineBuffer, PP, *I);
+ for (unsigned i = 0, e = InitOpts.Includes.size(); i != e; ++i) {
+ const std::string &Path = InitOpts.Includes[i];
+ if (Path == InitOpts.ImplicitPTHInclude)
+ AddImplicitIncludePTH(PredefineBuffer, PP, Path);
else
- AddImplicitInclude(PredefineBuffer, *I);
+ AddImplicitInclude(PredefineBuffer, Path);
}
// Null terminate PredefinedBuffer and add it.
OpenPOWER on IntegriCloud