History log of /llvm-project/llvm/lib/Support/CommandLine.cpp (Results 151 – 175 of 443)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 4fe6a8c8 23-Dec-2016 Mehdi Amini <mehdi.amini@apple.com>

Add an assertion for cl::opt names: they can't start with '-'

llvm-svn: 290467


# 76a00b51 14-Dec-2016 Mehdi Amini <mehdi.amini@apple.com>

Don't double-initialize cl::opt for iterating in reverse order to uncover non-determinism in codegen by default

Bots are broken and needs to be fixed before having this on by default.
The feature wa

Don't double-initialize cl::opt for iterating in reverse order to uncover non-determinism in codegen by default

Bots are broken and needs to be fixed before having this on by default.
The feature was committed in r289619.

I tried to disable it in r289624 and failed because it was initialized in two places.

llvm-svn: 289626

show more ...


# f6b069c7 14-Dec-2016 Mandeep Singh Grang <mgrang@codeaurora.org>

[llvm] Iterate SmallPtrSet in reverse order to uncover non-determinism in codegen

Summary:
Given a flag (-mllvm -reverse-iterate) this patch will enable iteration of SmallPtrSet in reverse order.
Th

[llvm] Iterate SmallPtrSet in reverse order to uncover non-determinism in codegen

Summary:
Given a flag (-mllvm -reverse-iterate) this patch will enable iteration of SmallPtrSet in reverse order.
The idea is to compile the same source with and without this flag and expect the code to not change.
If there is a difference in codegen then it would mean that the codegen is sensitive to the iteration order of SmallPtrSet.
This is enabled only with LLVM_ENABLE_ABI_BREAKING_CHECKS.

Reviewers: chandlerc, dexonsmith, mehdi_amini

Subscribers: mgorny, emaste, llvm-commits

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

llvm-svn: 289619

show more ...


Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1
# f258ff1f 20-Nov-2016 Serge Pavlov <sepavloff@gmail.com>

Fix file name resolution in nested response files

If a response file in construct `@file` was specified by relative name,
constructs `@file` nested within it were resolved incorrectly if the
flag Re

Fix file name resolution in nested response files

If a response file in construct `@file` was specified by relative name,
constructs `@file` nested within it were resolved incorrectly if the
flag RelativeNames in call to ExpandResponseFile was set to true.
This feature is used in configuration files, tests for it are in
respective change (see D24933).

llvm-svn: 287482

show more ...


# 6ac8e034 01-Nov-2016 Serge Pavlov <sepavloff@gmail.com>

Allow resolving response file names relative to including file

If a response file included by construct @file itself includes a response file
and that file is specified by relative file name, curren

Allow resolving response file names relative to including file

If a response file included by construct @file itself includes a response file
and that file is specified by relative file name, current behavior is to resolve
the name relative to the current working directory. The change adds additional
flag to ExpandResponseFiles that may be used to resolve nested response file
names relative to including file. With the new mode a set of related response
files may be kept together and reference each other with short position
independent names.

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

llvm-svn: 285675

show more ...


# d6802878 12-Oct-2016 Alex Lorenz <arphaman@gmail.com>

[Support][CommandLine] Display subcommands in help when there are less than 3
subcommands

This commit fixes a bug where the help output doesn't display subcommands when
a tool has less than 3 subcom

[Support][CommandLine] Display subcommands in help when there are less than 3
subcommands

This commit fixes a bug where the help output doesn't display subcommands when
a tool has less than 3 subcommands.

This change doesn't include a corresponding unittest as there is no viable way
to provide a unittest for it.

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

llvm-svn: 283998

show more ...


# 79f3333d 11-Oct-2016 Zachary Turner <zturner@google.com>

[cl] Don't print subcommand help when no subcommands present.

Previously we would print

USAGE: <exe> [subcommand] [options]

Even if no subcommands were present. This changes the output
format t

[cl] Don't print subcommand help when no subcommands present.

Previously we would print

USAGE: <exe> [subcommand] [options]

Even if no subcommands were present. This changes the output
format to only print "[subcommand]" if there is at least one
subcommand.

Fixes llvm.org/pr30598

Patch by Serge Guelton

llvm-svn: 283892

show more ...


# 27358cff 05-Oct-2016 Dean Michael Berris <dberris@google.com>

[Support][CommandLine] Add cl::getRegisteredSubcommands()

This should allow users of the library to get a range to iterate through
all the subcommands that are registered to the global parser. This

[Support][CommandLine] Add cl::getRegisteredSubcommands()

This should allow users of the library to get a range to iterate through
all the subcommands that are registered to the global parser. This
allows users to define subcommands in libraries that self-register to
have dispatch done at a different stage (like main). It allows for
writing code like the following:

for (auto *S : cl::getRegisteredSubcommands()) {
if (*S) {
// Dispatch on S->getName().
}
}

This change also contains tests that show this usage pattern.

Reviewers: zturner, dblaikie, echristo

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 283296

show more ...


# ec4fb5ba 05-Oct-2016 Mehdi Amini <mehdi.amini@apple.com>

Use StringRef in StringSaver API (NFC)

llvm-svn: 283290


# e11b745b 01-Oct-2016 Mehdi Amini <mehdi.amini@apple.com>

Use StringRef in CommandLine Options handling (NFC)

llvm-svn: 283007


# d97d5a2c 13-Sep-2016 Zachary Turner <zturner@google.com>

Revert "[Support][CommandLine] Add cl::getRegisteredSubcommands()"

This reverts r281290, as it breaks unit tests.
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/303

llvm-svn: 2

Revert "[Support][CommandLine] Add cl::getRegisteredSubcommands()"

This reverts r281290, as it breaks unit tests.
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/303

llvm-svn: 281292

show more ...


# d9d290c0 13-Sep-2016 Dean Michael Berris <dberris@google.com>

[Support][CommandLine] Add cl::getRegisteredSubcommands()

This should allow users of the library to get a range to iterate through
all the subcommands that are registered to the global parser. This

[Support][CommandLine] Add cl::getRegisteredSubcommands()

This should allow users of the library to get a range to iterate through
all the subcommands that are registered to the global parser. This
allows users to define subcommands in libraries that self-register to
have dispatch done at a different stage (like main). It allows for
writing code like the following:

for (auto *S : cl::getRegisteredSubcommands()) {
if (*S) {
// Dispatch on S->getName().
}
}

This change also contains tests that show this usage pattern.

Reviewers: zturner, dblaikie, echristo

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 281290

show more ...


Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2
# cd1d5aaf 17-Aug-2016 Justin Bogner <mail@justinbogner.com>

Replace a few more "fall through" comments with LLVM_FALLTHROUGH

Follow up to r278902. I had missed "fall through", with a space.

llvm-svn: 278970


# 0d955d0b 11-Aug-2016 David Majnemer <david.majnemer@gmail.com>

Use the range variant of find instead of unpacking begin/end

If the result of the find is only used to compare against end(), just
use is_contained instead.

No functionality change is intended.

ll

Use the range variant of find instead of unpacking begin/end

If the result of the find is only used to compare against end(), just
use is_contained instead.

No functionality change is intended.

llvm-svn: 278433

show more ...


Revision tags: llvmorg-3.9.0-rc1
# afb38afd 24-Jul-2016 David Majnemer <david.majnemer@gmail.com>

[CommandLine] Use Process::GetEnv instead of _wgetenv

Process::GetEnv does the right thing across our platforms.
CommandLine.cpp had, more or less, the same logic. Let's remove the
duplication.

No

[CommandLine] Use Process::GetEnv instead of _wgetenv

Process::GetEnv does the right thing across our platforms.
CommandLine.cpp had, more or less, the same logic. Let's remove the
duplication.

No functional change is intended.

llvm-svn: 276572

show more ...


# 60a3da3f 22-Jul-2016 Ying Yi <maggieyi666@gmail.com>

[llvm-cov] - Improve llvm-cov error message

Summary:

When giving the following command:
% llvm-cov report -instr-profile=default.profraw

llvm-cov will give the following error message:

>llvm-cov

[llvm-cov] - Improve llvm-cov error message

Summary:

When giving the following command:
% llvm-cov report -instr-profile=default.profraw

llvm-cov will give the following error message:

>llvm-cov report: Not enough positional command line arguments specified!
>Must specify at least 1 positional arguments: See: orbis-llvm-cov report -help

This patch changes the error message from '1 positional arguments'
to '1 positional argument'.

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

llvm-svn: 276404

show more ...


# ea9598b1 19-Jul-2016 Justin Lebar <jlebar@google.com>

Get rid of call to StringRef::substr that's never used.

Summary: substr doesn't modify the string, so this line has no effect.

Reviewers: majnemer

Subscribers: llvm-commits

Differential Revision:

Get rid of call to StringRef::substr that's never used.

Summary: substr doesn't modify the string, so this line has no effect.

Reviewers: majnemer

Subscribers: llvm-commits

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

llvm-svn: 276057

show more ...


# 07670b3e 29-Jun-2016 Zachary Turner <zturner@google.com>

Resubmit "Update llvm command line parser to support subcommands."

This fixes an issue where occurrence counts would be unexpectedly
reset when parsing different parts of a command line multiple
tim

Resubmit "Update llvm command line parser to support subcommands."

This fixes an issue where occurrence counts would be unexpectedly
reset when parsing different parts of a command line multiple
times.

**ORIGINAL COMMIT MESSAGE**

This allows command line tools to use syntaxes like the following:

llvm-foo.exe command1 -o1 -o2
llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options. This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified. So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

llvm-foo.exe --help
llvm-foo.exe command1 --help
llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz

llvm-svn: 274171

show more ...


# d16490df 28-Jun-2016 Manman Ren <manman.ren@gmail.com>

Revert r274054 to try to appease the bot

llvm-svn: 274072


# 2012d744 28-Jun-2016 Zachary Turner <zturner@google.com>

Update llvm command line parser to support subcommands.

This allows command line tools to use syntaxes like the following:

llvm-foo.exe command1 -o1 -o2
llvm-foo.exe command2 -p1 -p2

Where com

Update llvm command line parser to support subcommands.

This allows command line tools to use syntaxes like the following:

llvm-foo.exe command1 -o1 -o2
llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options. This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified. So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

llvm-foo.exe --help
llvm-foo.exe command1 --help
llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz
Differential Revision: http://reviews.llvm.org/D21485

llvm-svn: 274054

show more ...


# 4dea8f54 17-Jun-2016 Benjamin Kramer <benny.kra@googlemail.com>

Avoid duplicated map lookups. No functionality change intended.

llvm-svn: 273030


# 39c226fd 10-Jun-2016 Sanjoy Das <sanjoy@playingwithpointers.com>

[STLExtras] Introduce and use llvm::count_if; NFC

(This is split out from was D21115)

llvm-svn: 272435


# c321e534 08-Jun-2016 Benjamin Kramer <benny.kra@googlemail.com>

Apply most suggestions of clang-tidy's performance-unnecessary-value-param

Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

llvm-svn: 272190


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1
# 62de33c2 05-May-2016 Chris Bieneman <beanz@apple.com>

Remove LLVM_ENABLE_TIMESTAMPS

Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.

The only complicated bit of this patch is the Windows support. On windo

Remove LLVM_ENABLE_TIMESTAMPS

Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.

The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled.

With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic.

See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html

Reviewers: bogner, silvas, rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D19892

llvm-svn: 268670

show more ...


# fa7f4898 26-Apr-2016 Nico Weber <nicolasweber@gmx.de>

Use gcc's rules for parsing gcc-style response files

In gcc, \ escapes every character in response files. It is true that this makes
it harder to mention Windows files in rsp files, but not doing th

Use gcc's rules for parsing gcc-style response files

In gcc, \ escapes every character in response files. It is true that this makes
it harder to mention Windows files in rsp files, but not doing this means clang
disagrees with gcc, and also disagrees with the shell (on non-Windows) which
rsp file quoting is supposed to match. clang isn't free to choose what to do
here.

In general, the idea for response files is to take bits of your command line
and write them to a file unchanged, and have things work the same way. Since
the command line would've been interpreted by the shell, things in the rsp file
need to be subject to the same shell quoting rules.

People who want to put Windows-style paths in their response files either need
to do any of:
* escape their backslashes
* or use clang-cl which uses cl.exe/cmd.exe quoting rules
* pass --rsp-quoting=windows to clang to tell it to use
cl.exe/cmd.exe quoting rules for response files.

Fixes PR27464.
http://reviews.llvm.org/D19417

llvm-svn: 267556

show more ...


12345678910>>...18