#
af932173 |
| 15-Jul-2021 |
Mehdi Amini <joker.eph@gmail.com> |
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer
We can build it with -Werror=global-constructors now. This helps in situation where libSuppor
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer
We can build it with -Werror=global-constructors now. This helps in situation where libSupport is embedded as a shared library, potential with dlopen/dlclose scenario, and when command-line parsing or other facilities may not be involved. Avoiding the implicit construction of these cl::opt can avoid double-registration issues and other kind of behavior.
Reviewed By: lattner, jpienaar
Differential Revision: https://reviews.llvm.org/D105959
show more ...
|
#
16b5e9d6 |
| 16-Jul-2021 |
Mehdi Amini <joker.eph@gmail.com> |
Revert "Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer"
This reverts commit 42f588f39c5ce6f521e3709b8871d1fdd076292f. Broke some buildbots
|
#
42f588f3 |
| 15-Jul-2021 |
Mehdi Amini <joker.eph@gmail.com> |
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer
We can build it with -Werror=global-constructors now. This helps in situation where libSuppor
Use ManagedStatic and lazy initialization of cl::opt in libSupport to make it free of global initializer
We can build it with -Werror=global-constructors now. This helps in situation where libSupport is embedded as a shared library, potential with dlopen/dlclose scenario, and when command-line parsing or other facilities may not be involved. Avoiding the implicit construction of these cl::opt can avoid double-registration issues and other kind of behavior.
Reviewed By: lattner, jpienaar
Differential Revision: https://reviews.llvm.org/D105959
show more ...
|
#
1def2579 |
| 08-Jul-2021 |
David Blaikie <dblaikie@gmail.com> |
PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23
C++23 will make these conversions ambiguous - so fix them to make the codebase forward-compatible wit
PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23
C++23 will make these conversions ambiguous - so fix them to make the codebase forward-compatible with C++23 (& a follow-up change I've made will make this ambiguous/invalid even in <C++23 so we don't regress this & it generally improves the code anyway)
show more ...
|
#
42f74e82 |
| 23-Jun-2021 |
Martin Storsjö <martin@martin.st> |
[llvm] Rename StringRef _lower() method calls to _insensitive()
This is a mechanical change. This actually also renames the similarly named methods in the SmallString class, however these methods do
[llvm] Rename StringRef _lower() method calls to _insensitive()
This is a mechanical change. This actually also renames the similarly named methods in the SmallString class, however these methods don't seem to be used outside of the llvm subproject, so this doesn't break building of the rest of the monorepo.
show more ...
|
Revision tags: llvmorg-12.0.1-rc1 |
|
#
ba7a92c0 |
| 21-Apr-2021 |
Nico Weber <thakis@chromium.org> |
[Support] Don't include VirtualFileSystem.h in CommandLine.h
CommandLine.h is indirectly included in ~50% of TUs when building clang, and VirtualFileSystem.h is large.
(Already remarked by jhenders
[Support] Don't include VirtualFileSystem.h in CommandLine.h
CommandLine.h is indirectly included in ~50% of TUs when building clang, and VirtualFileSystem.h is large.
(Already remarked by jhenderson on D70769.)
No behavior change.
Differential Revision: https://reviews.llvm.org/D100957
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
e3f02302 |
| 17-Dec-2020 |
Joachim Meyer <joachim@joameyer.de> |
[Support] Indent multi-line descr of enum cli options.
As noted in https://reviews.llvm.org/D93459, the formatting of multi-line descriptions of clEnumValN and the likes is unfavorable. Thus this pa
[Support] Indent multi-line descr of enum cli options.
As noted in https://reviews.llvm.org/D93459, the formatting of multi-line descriptions of clEnumValN and the likes is unfavorable. Thus this patch adds support for correctly indenting these.
Reviewed By: serge-sans-paille
Differential Revision: https://reviews.llvm.org/D93494
show more ...
|
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, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3 |
|
#
fad75598 |
| 06-Jul-2020 |
Sergej Jaskiewicz <jaskiewiczs@icloud.com> |
[llvm] [unittests] Remove temporary files after they're not needed
Some LLVM unit tests forget to clean up temporary files and directories. Introduce RAII classes for cleaning them up.
Refactor the
[llvm] [unittests] Remove temporary files after they're not needed
Some LLVM unit tests forget to clean up temporary files and directories. Introduce RAII classes for cleaning them up.
Refactor the tests to use those classes.
Differential Revision: https://reviews.llvm.org/D83228
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.
|
#
dab898f9 |
| 14-Jul-2020 |
Serge Pavlov <sepavloff@gmail.com> |
[Windows] Fix limit on command line size
This reapplies commit d4020ef7c474, reverted in ac0edc55887b because it broke build of LLDB. This commit contains appropriate changes for LLDB. The original
[Windows] Fix limit on command line size
This reapplies commit d4020ef7c474, reverted in ac0edc55887b because it broke build of LLDB. This commit contains appropriate changes for LLDB. The original commit message is below.
Documentation on CreateProcessW states that maximal size of command line is 32767 characters including ternimation null character. In the function llvm::sys::commandLineFitsWithinSystemLimits this limit was set to 32768. As a result if command line was exactly 32768 characters long, a response file was not created and CreateProcessW was called with too long command line.
Differential Revision: https://reviews.llvm.org/D83772
show more ...
|
#
ac0edc55 |
| 21-Jul-2020 |
Serge Pavlov <sepavloff@gmail.com> |
Revert "[Windows] Fix limit on command line size"
This reverts commit d4020ef7c474b5e695d77aa100d7f68dc0c66b4e. It broke LLDB buildbot: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/build
Revert "[Windows] Fix limit on command line size"
This reverts commit d4020ef7c474b5e695d77aa100d7f68dc0c66b4e. It broke LLDB buildbot: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/17702.
show more ...
|
#
d4020ef7 |
| 14-Jul-2020 |
Serge Pavlov <sepavloff@gmail.com> |
[Windows] Fix limit on command line size
Documentation on CreateProcessW states that maximal size of command line is 32767 characters including ternimation null character. In the function llvm::sys:
[Windows] Fix limit on command line size
Documentation on CreateProcessW states that maximal size of command line is 32767 characters including ternimation null character. In the function llvm::sys::commandLineFitsWithinSystemLimits this limit was set to 32768. As a result if command line was exactly 32768 characters long, a response file was not created and CreateProcessW was called with too long command line.
Differential Revision: https://reviews.llvm.org/D83772
show more ...
|
Revision tags: 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 ...
|
#
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 |
|
#
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 |
|
#
213aea4c |
| 11-Mar-2020 |
Reid Kleckner <rnk@google.com> |
Remove unused Endian.h includes, NFC
Mainly avoids including Host.h everywhere:
$ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \ | grep '^[-+] ' | sort | uniq -c | sort -nr 3
Remove unused Endian.h includes, NFC
Mainly avoids including Host.h everywhere:
$ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \ | grep '^[-+] ' | sort | uniq -c | sort -nr 3141 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/Host.h
show more ...
|
Revision tags: llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
#
4a6e13ad |
| 09-Dec-2019 |
David Green <david.green@arm.com> |
[CommandLine] Add missing Callbacks
It appears that the cl::bits options are not used anywhere in-tree. In the recent addition to add Callback's to the options, the Callback was missing from this on
[CommandLine] Add missing Callbacks
It appears that the cl::bits options are not used anywhere in-tree. In the recent addition to add Callback's to the options, the Callback was missing from this one. This fixes it by adding the same code from the other classes.
It also adds a simple test, of sorts, just to make sure these continue compiling.
show more ...
|
#
6555995a |
| 06-Dec-2019 |
Don Hinton <donh@apple.com> |
[CommandLine] Add callbacks to Options
Summary: Add a new cl::callback attribute to Option.
This attribute specifies a callback function that is called when an option is seen, and can be used to se
[CommandLine] Add callbacks to Options
Summary: Add a new cl::callback attribute to Option.
This attribute specifies a callback function that is called when an option is seen, and can be used to set other options, as in option A implies option B. If the option is a `cl::list`, and `cl::CommaSeparated` is also specified, the callback will fire once for each value. This could be used to validate combinations or selectively set other options.
Reviewers: beanz, thomasfinch, MaskRay, thopre, serge-sans-paille
Reviewed By: beanz
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70620
show more ...
|
Revision tags: 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 ...
|
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 ...
|
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 ...
|