diff options
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 325b233ac5ec7..c890f77415033 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -858,11 +858,14 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) { : std::move(*CLOptions)); if (HasConfigFile) for (auto *Opt : *CLOptions) { + if (Opt->getOption().matches(options::OPT_config)) + continue; + unsigned Index = Args.MakeIndex(Opt->getSpelling()); const Arg *BaseArg = &Opt->getBaseArg(); if (BaseArg == Opt) BaseArg = nullptr; Arg *Copy = new llvm::opt::Arg(Opt->getOption(), Opt->getSpelling(), - Args.size(), BaseArg); + Index, BaseArg); Copy->getValues() = Opt->getValues(); if (Opt->isClaimed()) Copy->claim(); |