diff options
author | Nico Weber <nicolasweber@gmx.de> | 2019-07-05 15:12:31 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2019-07-05 15:12:31 +0000 |
commit | 2bca3d4f0ca41d1f000194fb13c2a28f20e1eff6 (patch) | |
tree | c1b2be2daeeb9580ed1c9a1c788bcf8716c9fa7e /clang/lib | |
parent | 7e0c10b55ff781906b1ac81254ce705b00264aee (diff) | |
download | bcm5719-llvm-2bca3d4f0ca41d1f000194fb13c2a28f20e1eff6.tar.gz bcm5719-llvm-2bca3d4f0ca41d1f000194fb13c2a28f20e1eff6.zip |
Add a comment explaining why a function exists
llvm-svn: 365212
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index f2d0f6ce14e..22f26d90bd7 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -966,6 +966,9 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) { InputArgList Args = std::move(HasConfigFile ? std::move(*CfgOptions) : std::move(*CLOptions)); + // The args for config files or /clang: flags belong to different InputArgList + // objects than Args. This copies an Arg from one of those other InputArgLists + // to the ownership of Args. auto appendOneArg = [&Args](const Arg *Opt, const Arg *BaseArg) { unsigned Index = Args.MakeIndex(Opt->getSpelling()); Arg *Copy = new llvm::opt::Arg(Opt->getOption(), Opt->getSpelling(), |