[PATCH] D27670: Translate index of command line item into in index of parsed argument

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 00:59:47 PST 2016


sepavloff created this revision.
sepavloff added a subscriber: llvm-commits.

To support configuration files we need a mean to distinguish arguments that come
from such file and those actually specified in command line. In particular, the
warnings about unused argument need to be suppressed for the arguments defined
in config files. Number of strings that come from configuration file can be
determined by the code that expands this file. Driver then converts these strings
into collection of objects of type 'llvm::opt::Arg', this is not a one-to-one
transformation. Options with separated arguments, such as '-triple' are
represented by two strings in command line but are transformed into one argument
object.

These change adds additional argument to 'OptTable::ParseArgs', which allows to
calculate number of arguments corresponding to config file content.


https://reviews.llvm.org/D27670

Files:
  include/llvm/Option/OptTable.h
  lib/Option/OptTable.cpp
  unittests/Option/OptionParsingTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27670.81054.patch
Type: text/x-patch
Size: 4927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161212/75a46bcb/attachment.bin>


More information about the llvm-commits mailing list