summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-06-22 22:07:27 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-06-22 22:07:27 +0000
commit69a1d8c64674594ec3853f1bce3065d276241349 (patch)
tree765b99d8620df03a45b110b5ce23b2ffebe4ce24 /clang/lib/Frontend/CompilerInvocation.cpp
parent1f02f962f55e4991dc9f31f26cfdcd25e13762a1 (diff)
downloadbcm5719-llvm-69a1d8c64674594ec3853f1bce3065d276241349.tar.gz
bcm5719-llvm-69a1d8c64674594ec3853f1bce3065d276241349.zip
Update for LLVM API change to return by InputArgList directly (rather than by pointer) from ParseArgs
llvm-svn: 240349
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 2d26548db39..514484a47f8 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1849,37 +1849,37 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
std::unique_ptr<OptTable> Opts(createDriverOptTable());
const unsigned IncludedFlagsBitmask = options::CC1Option;
unsigned MissingArgIndex, MissingArgCount;
- std::unique_ptr<InputArgList> Args(
+ InputArgList Args =
Opts->ParseArgs(llvm::makeArrayRef(ArgBegin, ArgEnd), MissingArgIndex,
- MissingArgCount, IncludedFlagsBitmask));
+ MissingArgCount, IncludedFlagsBitmask);
// Check for missing argument error.
if (MissingArgCount) {
Diags.Report(diag::err_drv_missing_argument)
- << Args->getArgString(MissingArgIndex) << MissingArgCount;
+ << Args.getArgString(MissingArgIndex) << MissingArgCount;
Success = false;
}
// Issue errors on unknown arguments.
- for (const Arg *A : Args->filtered(OPT_UNKNOWN)) {
- Diags.Report(diag::err_drv_unknown_argument) << A->getAsString(*Args);
+ for (const Arg *A : Args.filtered(OPT_UNKNOWN)) {
+ Diags.Report(diag::err_drv_unknown_argument) << A->getAsString(Args);
Success = false;
}
- Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), *Args, Diags);
- Success &= ParseMigratorArgs(Res.getMigratorOpts(), *Args);
- ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), *Args);
- Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, &Diags);
- ParseCommentArgs(Res.getLangOpts()->CommentOpts, *Args);
- ParseFileSystemArgs(Res.getFileSystemOpts(), *Args);
+ Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), Args, Diags);
+ Success &= ParseMigratorArgs(Res.getMigratorOpts(), Args);
+ ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), Args);
+ Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags);
+ ParseCommentArgs(Res.getLangOpts()->CommentOpts, Args);
+ ParseFileSystemArgs(Res.getFileSystemOpts(), Args);
// FIXME: We shouldn't have to pass the DashX option around here
- InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags);
- ParseTargetArgs(Res.getTargetOpts(), *Args);
- Success &= ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags,
+ InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), Args, Diags);
+ ParseTargetArgs(Res.getTargetOpts(), Args);
+ Success &= ParseCodeGenArgs(Res.getCodeGenOpts(), Args, DashX, Diags,
Res.getTargetOpts());
- ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), *Args);
+ ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), Args);
if (DashX != IK_AST && DashX != IK_LLVM_IR) {
- ParseLangArgs(*Res.getLangOpts(), *Args, DashX, Diags);
+ ParseLangArgs(*Res.getLangOpts(), Args, DashX, Diags);
if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC)
Res.getLangOpts()->ObjCExceptions = 1;
}
@@ -1888,8 +1888,8 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
// ParsePreprocessorArgs and remove the FileManager
// parameters from the function and the "FileManager.h" #include.
FileManager FileMgr(Res.getFileSystemOpts());
- ParsePreprocessorArgs(Res.getPreprocessorOpts(), *Args, FileMgr, Diags);
- ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), *Args,
+ ParsePreprocessorArgs(Res.getPreprocessorOpts(), Args, FileMgr, Diags);
+ ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), Args,
Res.getFrontendOpts().ProgramAction);
return Success;
}
OpenPOWER on IntegriCloud