forked from OSchip/llvm-project
Add a comment explaining why a function exists
llvm-svn: 365212
This commit is contained in:
parent
7e0c10b55f
commit
2bca3d4f0c
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue