aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/CC1Options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/CC1Options.cpp')
-rw-r--r--lib/Driver/CC1Options.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/Driver/CC1Options.cpp b/lib/Driver/CC1Options.cpp
index 7b0d67a1d2..afa01434f3 100644
--- a/lib/Driver/CC1Options.cpp
+++ b/lib/Driver/CC1Options.cpp
@@ -135,20 +135,13 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
//
void CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
- const llvm::SmallVectorImpl<llvm::StringRef> &Args) {
- // This is gratuitous, but until we switch the driver to using StringRef we
- // need to get C strings.
- llvm::SmallVector<std::string, 16> StringArgs(Args.begin(), Args.end());
- llvm::SmallVector<const char *, 16> CStringArgs;
- for (unsigned i = 0, e = Args.size(); i != e; ++i)
- CStringArgs.push_back(StringArgs[i].c_str());
-
+ const char **ArgBegin,
+ const char **ArgEnd) {
// Parse the arguments.
llvm::OwningPtr<OptTable> Opts(createCC1OptTable());
unsigned MissingArgIndex, MissingArgCount;
llvm::OwningPtr<InputArgList> InputArgs(
- Opts->ParseArgs(CStringArgs.begin(), CStringArgs.end(),
- MissingArgIndex, MissingArgCount));
+ Opts->ParseArgs(ArgBegin, ArgEnd,MissingArgIndex, MissingArgCount));
// Check for missing argument error.
if (MissingArgCount) {
@@ -159,6 +152,8 @@ void CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
<< " value )\n";
}
- ParseCodeGenArgs(Res.getCodeGenOpts(), *InputArgs);
+ // FIXME: Disabled until the FIXMEs are resolved.
+ if (0)
+ ParseCodeGenArgs(Res.getCodeGenOpts(), *InputArgs);
ParseTargetArgs(Res.getTargetOpts(), *InputArgs);
}