From 1f031ccac56820467eff9b6d620dffca78ce122c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:32 +0000 Subject: Vendor import of clang 6.0.1 release r335540: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final@335540 --- lib/Driver/Driver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Driver/Driver.cpp') diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 325b233ac5ec..c890f7741503 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -858,11 +858,14 @@ Compilation *Driver::BuildCompilation(ArrayRef 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(); -- cgit v1.3