summaryrefslogtreecommitdiff
path: root/lib/FrontendTool
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-04 01:36:04 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-04 01:36:04 +0000
commitb3ca2637a9a3aeac5c7103eb4d612528680e7e20 (patch)
treefb498af0570258b6d92eff667717bf0066b5e548 /lib/FrontendTool
parent1a0d92f7d673dbd11be7229177a080cc65a7468c (diff)
downloadclang-b3ca2637a9a3aeac5c7103eb4d612528680e7e20.tar.gz
Use variable in place of multiple CI.getFrontendOpts() calls and use a bit
of ArrayRef goodness. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/FrontendTool')
-rw-r--r--lib/FrontendTool/ExecuteCompilerInvocation.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index 9f2bdf25be..cfb185ec52 100644
--- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -87,12 +87,14 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) {
if (!Act)
return 0;
- if (CI.getFrontendOpts().FixAndRecompile) {
+ const FrontendOptions &FEOpts = CI.getFrontendOpts();
+
+ if (FEOpts.FixAndRecompile) {
Act = new FixItRecompile(Act);
}
// Potentially wrap the base FE action in an ARC Migrate Tool action.
- switch (CI.getFrontendOpts().ARCMTAction) {
+ switch (FEOpts.ARCMTAction) {
case FrontendOptions::ARCMT_None:
break;
case FrontendOptions::ARCMT_Check:
@@ -103,17 +105,16 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) {
break;
case FrontendOptions::ARCMT_Migrate:
Act = new arcmt::MigrateAction(Act,
- CI.getFrontendOpts().ARCMTMigrateDir,
- CI.getFrontendOpts().ARCMTMigrateReportOut,
- CI.getFrontendOpts().ARCMTMigrateEmitARCErrors);
+ FEOpts.ARCMTMigrateDir,
+ FEOpts.ARCMTMigrateReportOut,
+ FEOpts.ARCMTMigrateEmitARCErrors);
break;
}
// If there are any AST files to merge, create a frontend action
// adaptor to perform the merge.
- if (!CI.getFrontendOpts().ASTMergeFiles.empty())
- Act = new ASTMergeAction(Act, &CI.getFrontendOpts().ASTMergeFiles[0],
- CI.getFrontendOpts().ASTMergeFiles.size());
+ if (!FEOpts.ASTMergeFiles.empty())
+ Act = new ASTMergeAction(Act, FEOpts.ASTMergeFiles[0]);
return Act;
}