History log of /llvm-project/llvm/lib/Support/CommandLine.cpp (Results 76 – 100 of 443)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-11.0.1-rc1
# f5524745 05-Nov-2020 Reid Kleckner <rnk@google.com>

Fix bugs in EOL marking in command line tokenizers

Add unit tests for this behavior, since the integration test for
clang-cl did not catch these bugs.

Fixes PR47604

Differential Revision: https://

Fix bugs in EOL marking in command line tokenizers

Add unit tests for this behavior, since the integration test for
clang-cl did not catch these bugs.

Fixes PR47604

Differential Revision: https://reviews.llvm.org/D90866

show more ...


Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2
# 593e1962 04-Aug-2020 Fangrui Song <maskray@google.com>

[llvm-symbolizer] Switch command line parsing from llvm::cl to OptTable

for the advantage outlined by D83639 ([OptTable] Support grouped short options)

Some behavior changes:

* -i={0,false} is rem

[llvm-symbolizer] Switch command line parsing from llvm::cl to OptTable

for the advantage outlined by D83639 ([OptTable] Support grouped short options)

Some behavior changes:

* -i={0,false} is removed. Use --no-inlines instead.
* --demangle={0,false} is removed. Use --no-demangle instead
* -untag-addresses={0,false} is removed. Use --no-untag-addresses instead

Added a higher level API OptTable::parseArgs which handles optional
initial options populated from an environment variable, expands response
files recursively, and parses options.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D83530

show more ...


# c068e9c8 31-Jul-2020 Fangrui Song <maskray@google.com>

[Support][CommandLine] Delete unused llvm::cl::ParseEnvrironmentOptions

The function was added in 2003. It is not used and can be emulated with ParseCommandLineOptions.


Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init
# dbed9d5c 09-Jul-2020 Simon Pilgrim <llvm-dev@redking.me.uk>

VersionPrinter - use const auto& iterator in for-range-loop.

Avoids unnecessary copies and silences clang tidy warning.


Revision tags: llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2
# 5c621900 17-Jun-2020 Michał Górny <mgorny@gentoo.org>

[llvm] [CommandLine] Do not suggest really hidden opts in nearest lookup

Skip 'really hidden' options when performing lookup of the nearest
option when invalid option was passed. Since these option

[llvm] [CommandLine] Do not suggest really hidden opts in nearest lookup

Skip 'really hidden' options when performing lookup of the nearest
option when invalid option was passed. Since these options aren't even
documented in --help-hidden, it seems inconsistent to suggest them
to users.

This fixes clang-tools-extra test failures due to unexpected suggestions
when linking the tools to LLVM dylib (that provides more options than
the subset of LLVM libraries linked directly).

Differential Revision: https://reviews.llvm.org/D82001

show more ...


# 5b460fb1 02-Jun-2020 Jonas Devlieghere <jonas@devlieghere.com>

[llvm-dwarfdump] Print [=<offset>] after --debug-* options in help output.

Some of the --debug-* options can take an optional offset. Although the
man page does a good job of making that clear, it's

[llvm-dwarfdump] Print [=<offset>] after --debug-* options in help output.

Some of the --debug-* options can take an optional offset. Although the
man page does a good job of making that clear, it's much harder to
discover from the help output.

Currently the only reference to this is the following sentence:

> Where applicable these parameters take an optional =<offset> argument
> to dump only the entry at the specified offset.

This patch changes the help output from to print [=<offset>] after the
options that take an offset.

--debug-info[=<offset>] - Dump the .debug_info section

rdar://problem/63150066

Differential revision: https://reviews.llvm.org/D80959

show more ...


# 2d068e53 27-May-2020 Adrian McCarthy <amccarth@google.com>

Fix Windows command line bug when last token in response file is ""

Patch by Neil Dhar <dhar@alumni.duke.edu>

Current state machine for parsing tokens from response files in Windows
does not correc

Fix Windows command line bug when last token in response file is ""

Patch by Neil Dhar <dhar@alumni.duke.edu>

Current state machine for parsing tokens from response files in Windows
does not correctly handle the case where the last token is "". The current
implementation handles the last token by only adding it if it is not empty,
however this does not cover the case where the last token is meant to be
the empty string. We can cover this case by checking whether the state
machine was last in the UNQUOTED state, which indicates that the last
character of the input was a non-whitespace character.

Differential Revision: https://reviews.llvm.org/D78346

show more ...


Revision tags: llvmorg-10.0.1-rc1
# 270d3faf 01-May-2020 Reid Kleckner <rnk@google.com>

[COFF] Add and use a zero-copy tokenizer for .drectve

This generalizes the main Windows command line tokenizer to be able to
produce StringRef substrings as well as freshly copied C strings. The
imp

[COFF] Add and use a zero-copy tokenizer for .drectve

This generalizes the main Windows command line tokenizer to be able to
produce StringRef substrings as well as freshly copied C strings. The
implementation is still shared with the normal tokenizer, which is
important, because we have unit tests for that.

.drective sections can be very long. They can potentially list up to
every symbol in the object file by name. It is worth avoiding these
string copies.

This saves a lot of memory when linking chrome.dll with PGO
instrumentation:

BEFORE AFTER % IMP
peak memory: 6657.76MB 4983.54MB -25%
real: 4m30.875s 2m26.250s -46%

The time improvement may not be real, my machine was noisy while running
this, but that the peak memory usage improvement should be real.

This change may also help apps that heavily use dllexport annotations,
because those also use linker directives in object files. Apps that do
not use many directives are unlikely to be affected.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D79262

show more ...


# 54cfc694 17-Apr-2020 Yi-Hong Lyu <yilyu@microsoft.com>

[CommandLine] Fix cl::ConsumeAfter support with more than one positional argument

Summary:
Currently, cl::ConsumeAfter only works for the case that has exactly one
positional argument. Without the f

[CommandLine] Fix cl::ConsumeAfter support with more than one positional argument

Summary:
Currently, cl::ConsumeAfter only works for the case that has exactly one
positional argument. Without the fix, it skip fulfilling first positional
argument and put that additional positional argument in interpreter arguments.

Reviewers: bkramer, Mordante, rnk, lattner, beanz, craig.topper

Reviewed By: rnk

Subscribers: JosephTremoulet, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77242

show more ...


Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1
# adcd0268 28-Jan-2020 Benjamin Kramer <benny.kra@googlemail.com>

Make llvm::StringRef to std::string conversions explicit.

This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly m

Make llvm::StringRef to std::string conversions explicit.

This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.

This doesn't actually modify StringRef yet, I'll do that in a follow-up.

show more ...


Revision tags: llvmorg-11-init
# 8dc7b982 01-Jan-2020 Mark de Wever <koraq@xs4all.nl>

[NFC] Fixes -Wrange-loop-analysis warnings

This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.

Differential Revision: https://reviews.llvm.org/D71857


# a9fdfe63 22-Dec-2019 Reid Kleckner <rnk@google.com>

Fix LLVM tool --version build mode printing for MSVC

LLVM tools such as llc print "DEBUG build" or "Optimized build" when
passed --version. Before this change, this was implemented by checking
for t

Fix LLVM tool --version build mode printing for MSVC

LLVM tools such as llc print "DEBUG build" or "Optimized build" when
passed --version. Before this change, this was implemented by checking
for the __OPTIMIZE__ GCC macro. MSVC does not define this macro. For
MSVC, control this behavior with _DEBUG instead. It doesn't have
precisely the same meaning, but in most configurations, it will do the
right thing.

Fixes PR17752

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D71817

show more ...


# a77a290a 20-Dec-2019 River Riddle <riverriddle@google.com>

[CommandLine] Add template instantiations of cl::parser for long and long long.

This allows cl::opt<int64_t>.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D71729


Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2
# b3b37783 04-Dec-2019 Kadir Cetinkaya <kadircet@google.com>

Reapply "[llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles"

Attemps to fix windows buildbots.


# 0f12f909 04-Dec-2019 Kadir Cetinkaya <kadircet@google.com>

Revert "[llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles"

This reverts commit 75656005dbc8866e1888932a68a830b0df403560.


# 75656005 29-Nov-2019 Kadir Cetinkaya <kadircet@google.com>

[llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles

Summary:
This is a follow-up to D70769 and D70222, which allows propagation of
current directory down to ExpandResponse

[llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles

Summary:
This is a follow-up to D70769 and D70222, which allows propagation of
current directory down to ExpandResponseFiles for handling of relative paths.

Previously clients had to mutate FS to achieve that, which is not thread-safe
and can even be thread-hostile in the case of real file system.

Reviewers: sammccall

Subscribers: hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D70857

show more ...


# 3ee277b8 29-Nov-2019 Kadir Cetinkaya <kadircet@google.com>

[Support] add vfs support for ExpandResponseFiles

Summary: add vfs support for `ExpandResponseFiles`.

Patch By: liu hui(@lh123)

Reviewers: kadircet, espindola, alexshap, rupprecht, jhenderson

Rev

[Support] add vfs support for ExpandResponseFiles

Summary: add vfs support for `ExpandResponseFiles`.

Patch By: liu hui(@lh123)

Reviewers: kadircet, espindola, alexshap, rupprecht, jhenderson

Reviewed By: kadircet

Subscribers: mgorny, sammccall, merge_guards_bot, emaste, sbc100, arichardson, hiraditya, aheejin, jakehehrlich, MaskRay, rupprecht, seiya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D70769

show more ...


Revision tags: llvmorg-9.0.1-rc1
# 405e8368 06-Nov-2019 Don Hinton <hintonda@gmail.com>

[CommandLine] Add inline ArgName printing

Summary:
This patch adds PrintArgInline (after PrintArg) that strips the
leading spaces from an argument before printing them, for usage
inline.

Related bu

[CommandLine] Add inline ArgName printing

Summary:
This patch adds PrintArgInline (after PrintArg) that strips the
leading spaces from an argument before printing them, for usage
inline.

Related bug: PR42943 <https://bugs.llvm.org/show_bug.cgi?id=42943>

Patch by Daan Sprenkels!

Reviewers: jhenderson, chandlerc, hintonda

Reviewed By: jhenderson

Subscribers: hiraditya, kristina, llvm-commits, dsprenkels

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69501

show more ...


# 482f4d9a 05-Oct-2019 Mehdi Amini <joker.eph@gmail.com>

Expose ProvidePositionalOption as a public API

The motivation is to reuse the key value parsing logic here to
parse instance specific pass options within the context of MLIR.
The primary functionali

Expose ProvidePositionalOption as a public API

The motivation is to reuse the key value parsing logic here to
parse instance specific pass options within the context of MLIR.
The primary functionality exposed is the "," splitting for
arrays and the logic for properly handling duplicate definitions
of a single flag.

Patch by: Parker Schuh <parkers@google.com>

Differential Revision: https://reviews.llvm.org/D68294

llvm-svn: 373815

show more ...


Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init
# e6695821 11-Jul-2019 Haojian Wu <hokein@google.com>

Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

This reverts r365675 (git commit 43d75f977853c3ec891a440c362b2df183a211b5)

The patch causes a cras

Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

This reverts r365675 (git commit 43d75f977853c3ec891a440c362b2df183a211b5)

The patch causes a crash in SupportTests (CommandLineTest.AliasesWithArguments).

llvm-svn: 365742

show more ...


# 43d75f97 10-Jul-2019 Don Hinton <hintonda@gmail.com>

Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

Previously reverted in 364141 due to buildbot breakage, and fixed here
by making GeneralCategory global a

Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

Previously reverted in 364141 due to buildbot breakage, and fixed here
by making GeneralCategory global a ManagedStatic.

Summary:
This change processes `OptionCategory`s and `SubCommand`s as they
are seen instead of caching them in the Option class and processing
them later. Doing so simplifies the work needed to be done by the Global
parser and significantly reduces the size of the Option class to a mere 64
bytes.

Removing the `OptionCategory` cache saved 24 bytes, and removing
the `SubCommand` cache saved an additional 48 bytes, for a total of a
72 byte reduction.

Reviewed By: serge-sans-paille

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D62105

llvm-svn: 365675

show more ...


Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3
# 64b09245 22-Jun-2019 Don Hinton <hintonda@gmail.com>

Revert [CommandLine] Remove OptionCategory and SubCommand caches from the Option class.

This reverts r364134 (git commit a5b83bc9e3b8e8945b55068c762bd6c73621a4b0)

Caused errors in the asan bot, so

Revert [CommandLine] Remove OptionCategory and SubCommand caches from the Option class.

This reverts r364134 (git commit a5b83bc9e3b8e8945b55068c762bd6c73621a4b0)

Caused errors in the asan bot, so the GeneralCategory global needs to
be changed to ManagedStatic.

Differential Revision: https://reviews.llvm.org/D62105

llvm-svn: 364141

show more ...


# a5b83bc9 22-Jun-2019 Don Hinton <hintonda@gmail.com>

[CommandLine] Remove OptionCategory and SubCommand caches from the Option class.

Summary:
This change processes `OptionCategory`s and `SubCommand`s as they
are seen instead of caching them in the O

[CommandLine] Remove OptionCategory and SubCommand caches from the Option class.

Summary:
This change processes `OptionCategory`s and `SubCommand`s as they
are seen instead of caching them in the Option class and processing
them later. Doing so simplifies the work needed to be done by the Global
parser and significantly reduces the size of the Option class to a mere 64
bytes.

Removing the `OptionCategory` cache saved 24 bytes, and removing
the `SubCommand` cache saved an additional 48 bytes, for a total of a
72 byte reduction.

Reviewers: beanz, zturner, MaskRay, serge-sans-paille

Reviewed By: serge-sans-paille

Subscribers: serge-sans-paille, tstellar, zturner, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62105

llvm-svn: 364134

show more ...


Revision tags: llvmorg-8.0.1-rc2
# 5062cf59 10-Jun-2019 Shoaib Meenai <smeenai@fb.com>

[Support] Explicitly detect recursive response files

Previous detection relied upon an arbitrary hard coded limit of 21
response files, which some code bases were running up against.

The new detect

[Support] Explicitly detect recursive response files

Previous detection relied upon an arbitrary hard coded limit of 21
response files, which some code bases were running up against.

The new detection maintains a stack of processing response files and
explicitly checks if a newly encountered file is in the current stack.
Some bookkeeping data is necessary in order to detect when to pop the
stack.

Patch by Chris Glover.

Differential Revision: https://reviews.llvm.org/D62798

llvm-svn: 363005

show more ...


Revision tags: llvmorg-8.0.1-rc1
# 8249a888 16-May-2019 Don Hinton <hintonda@gmail.com>

[CommandLine] Don't allow duplicate categories.

Summary:
This is a fix to D61574, r360179, that allowed duplicate
OptionCategory's. This change adds a check to make sure a category can
only be adde

[CommandLine] Don't allow duplicate categories.

Summary:
This is a fix to D61574, r360179, that allowed duplicate
OptionCategory's. This change adds a check to make sure a category can
only be added once even if the user passes it twice.

Reviewed By: MaskRay

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61972

llvm-svn: 360913

show more ...


12345678910>>...18