#
934942c0 |
| 07-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Don't include Optional.h (NFC)
These source files no longer use Optional<T>, so they do not need to include Optional.h.
This is part of an effort to migrate from llvm::Optional to std::optio
[llvm] Don't include Optional.h (NFC)
These source files no longer use Optional<T>, so they do not need to include Optional.h.
This is part of an effort to migrate from llvm::Optional to std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
show more ...
|
#
3c255f67 |
| 06-Dec-2022 |
Krzysztof Parzyszek <kparzysz@quicinc.com> |
Process: convert Optional to std::optional
This applies to GetEnv and FindInEnvPath.
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
1f67dc8b |
| 20-Oct-2022 |
Serge Pavlov <sepavloff@gmail.com> |
[Driver] Enable nested configuration files
Users may partition parameters specified by configuration file and put different groups into separate files. These files are inserted into the main file us
[Driver] Enable nested configuration files
Users may partition parameters specified by configuration file and put different groups into separate files. These files are inserted into the main file using constructs `@file`. Relative file names in it are resolved relative to the including configuration file and this is not convenient in some cases. A configuration file, which resides in system directory, may need to include a file with user-defined parameters and still provide default definitions if such file is absent.
To solve such problems, the option `--config=` is allowed inside configuration files. Like `@file` it results in insertion of command-line arguments but the algorithm of file search is different and allows overriding system definitions with user ones.
Differential Revision: https://reviews.llvm.org/D136354
show more ...
|
#
fdab9f12 |
| 03-Nov-2022 |
Serge Pavlov <sepavloff@gmail.com> |
[Clang] Check for response file existence prior to check for recursion
As now errors in file operation are handled, check for file existence must be done prior to check for recursion, otherwise repo
[Clang] Check for response file existence prior to check for recursion
As now errors in file operation are handled, check for file existence must be done prior to check for recursion, otherwise reported errors are misleading.
Differential Revision: https://reviews.llvm.org/D136090
show more ...
|
#
fd3d7a9f |
| 31-Oct-2022 |
Serge Pavlov <sepavloff@gmail.com> |
Handle errors in expansion of response files
Previously an error raised during an expansion of response files (including configuration files) was ignored and only the fact of its presence was report
Handle errors in expansion of response files
Previously an error raised during an expansion of response files (including configuration files) was ignored and only the fact of its presence was reported to the user with generic error messages. This made it difficult to analyze problems. For example, if a configuration file tried to read an inexistent file, the error message said that 'configuration file cannot be found', which is wrong and misleading.
This change enhances handling errors in the expansion so that users could get more informative error messages.
Differential Revision: https://reviews.llvm.org/D136090
show more ...
|
#
c1728a40 |
| 29-Oct-2022 |
Serge Pavlov <sepavloff@gmail.com> |
Revert "Handle errors in expansion of response files"
This reverts commit 17eb198de934eced784e16ec15e020a574ba07e1. Reverted for investigation, because ClangDriverTests failed on some builders.
|
Revision tags: llvmorg-15.0.3 |
|
#
17eb198d |
| 14-Oct-2022 |
Serge Pavlov <sepavloff@gmail.com> |
Handle errors in expansion of response files
Previously an error raised during an expansion of response files (including configuration files) was ignored and only the fact of its presence was report
Handle errors in expansion of response files
Previously an error raised during an expansion of response files (including configuration files) was ignored and only the fact of its presence was reported to the user with generic error messages. This made it difficult to analyze problems. For example, if a configuration file tried to read an inexistent file, the error message said that 'configuration file cannot be found', which is wrong and misleading.
This change enhances handling errors in the expansion so that users could get more informative error messages.
Differential Revision: https://reviews.llvm.org/D136090
show more ...
|
#
0dec5e16 |
| 19-Oct-2022 |
Serge Pavlov <sepavloff@gmail.com> |
Keep configuration file search directories in ExpansionContext. NFC
Class ExpansionContext encapsulates options for search and expansion of response files, including configuration files. With this c
Keep configuration file search directories in ExpansionContext. NFC
Class ExpansionContext encapsulates options for search and expansion of response files, including configuration files. With this change the directories which are searched for configuration files are also stored in ExpansionContext.
Differential Revision: https://reviews.llvm.org/D135439
show more ...
|
Revision tags: working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
#
b934be2c |
| 21-Aug-2022 |
Serge Pavlov <sepavloff@gmail.com> |
[Support] Class for response file expansion (NFC)
Functions that implement expansion of response and config files depend on many options, which are passes as arguments. Extending the expansion requi
[Support] Class for response file expansion (NFC)
Functions that implement expansion of response and config files depend on many options, which are passes as arguments. Extending the expansion requires new options, it in turn causes changing calls in various places making them even more bulky.
This change introduces a class ExpansionContext, which represents set of options that control the expansion. Its methods implements expansion of responce files including config files. It makes extending the expansion easier.
No functional changes.
Differential Revision: https://reviews.llvm.org/D132379
show more ...
|
#
5ddde5f8 |
| 28-Sep-2022 |
Serge Pavlov <sepavloff@gmail.com> |
Revert "[Support] Class for response file expansion (NFC)"
This reverts commit 6e491c48d6b9cadcc5b77f730dd83a1448197329. There are missed changes in flang.
|
#
6e491c48 |
| 21-Aug-2022 |
Serge Pavlov <sepavloff@gmail.com> |
[Support] Class for response file expansion (NFC)
Functions that implement expansion of response and config files depend on many options, which are passes as arguments. Extending the expansion requi
[Support] Class for response file expansion (NFC)
Functions that implement expansion of response and config files depend on many options, which are passes as arguments. Extending the expansion requires new options, it in turn causes changing calls in various places making them even more bulky.
This change introduces a class ExpansionContext, which represents set of options that control the expansion. Its methods implements expansion of responce files including config files. It makes extending the expansion easier.
No functional changes.
Differential Revision: https://reviews.llvm.org/D132379
show more ...
|
#
7b9fae05 |
| 09-Sep-2022 |
Serge Pavlov <sepavloff@gmail.com> |
[Clang] Use virtual FS in processing config files
Clang has support of virtual file system for the purpose of testing, but treatment of config files did not use it. This change enables VFS in it as
[Clang] Use virtual FS in processing config files
Clang has support of virtual file system for the purpose of testing, but treatment of config files did not use it. This change enables VFS in it as well.
Differential Revision: https://reviews.llvm.org/D132867
show more ...
|
#
55e1441f |
| 09-Sep-2022 |
Serge Pavlov <sepavloff@gmail.com> |
Revert "[Clang] Use virtual FS in processing config files"
This reverts commit 9424497e43aff088e014d65fd952ec557e28e6cf. Some buildbots failed, reverted for investigation.
|
#
9424497e |
| 29-Aug-2022 |
Serge Pavlov <sepavloff@gmail.com> |
[Clang] Use virtual FS in processing config files
Clang has support of virtual file system for the purpose of testing, but treatment of config files did not use it. This change enables VFS in it as
[Clang] Use virtual FS in processing config files
Clang has support of virtual file system for the purpose of testing, but treatment of config files did not use it. This change enables VFS in it as well.
Differential Revision: https://reviews.llvm.org/D132867
show more ...
|
Revision tags: llvmorg-15.0.0-rc2 |
|
#
de9d80c1 |
| 08-Aug-2022 |
Fangrui Song <i@maskray.me> |
[llvm] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051.
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
f7872cdc |
| 29-Jun-2022 |
Nicolai Hähnle <nicolai.haehnle@amd.com> |
CommandLine: add and use cl::SubCommand::get{All,TopLevel}
Prefer using these accessors to access the special sub-commands corresponding to the top-level (no subcommand) and all sub-commands.
This
CommandLine: add and use cl::SubCommand::get{All,TopLevel}
Prefer using these accessors to access the special sub-commands corresponding to the top-level (no subcommand) and all sub-commands.
This is a preparatory step towards removing the use of ManagedStatic: with a subsequent change, these global instances will be moved to be regular function-scope statics.
It is split up to give downstream projects a (albeit short) window in which they can switch to using the accessors in a forward-compatible way.
Differential Revision: https://reviews.llvm.org/D129118
show more ...
|
#
360c1111 |
| 20-Jul-2022 |
Kazu Hirata <kazu@google.com> |
Use llvm::is_contained (NFC)
|
#
52cb9725 |
| 14-Jul-2022 |
Fangrui Song <i@maskray.me> |
[CommandLine] --help: print "-o <xxx>" instead of "-o=<xxx>"
Accepting -o= is a quirk of CommandLine. For --help, we should print the conventional "-o <xxx>".
|
Revision tags: llvmorg-14.0.6 |
|
#
6c396875 |
| 13-Jun-2022 |
Kazu Hirata <kazu@google.com> |
[Support] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
|
Revision tags: llvmorg-14.0.5 |
|
#
570e76bb |
| 03-Jun-2022 |
Reid Kleckner <rnk@google.com> |
[config] Remove vestigial LLVM_VERSION_INFO
This has been superseded by the llvm/Support/VCSRevision.h header. So far as I can tell, nothing in the CMake build sets LLVM_VERSION_INFO. It was always
[config] Remove vestigial LLVM_VERSION_INFO
This has been superseded by the llvm/Support/VCSRevision.h header. So far as I can tell, nothing in the CMake build sets LLVM_VERSION_INFO. It was always undefined, and the ifdefs using it were dead. However, CMake is very flexible, so it's possible that I missed some ways to set this variable. One could, for example, probably pass -DLLVM_VERSION_INFO=x on the command line and get that through to configure_file, or set the variable in an obscure way (`set(${proj}_VERSION_INFO "x")`). I'm reasonably confident that isn't happening, but I'd like a second opinion.
Update the Bazel and gn builds accordingly.
Differential Revision: https://reviews.llvm.org/D126977
show more ...
|
Revision tags: llvmorg-14.0.4 |
|
#
32814df4 |
| 03-May-2022 |
Simon Tatham <simon.tatham@arm.com> |
[Windows] Fix handling of \" in program name on cmd line.
Bugzilla #47579: if you invoke clang on Windows via a pathname in which a quoted section closes just after a backslash, e.g.
"C:\Program
[Windows] Fix handling of \" in program name on cmd line.
Bugzilla #47579: if you invoke clang on Windows via a pathname in which a quoted section closes just after a backslash, e.g.
"C:\Program Files\Whatever\"clang.exe
then cmd.exe and CreateProcess will correctly find the binary, because when they parse the program name at the start of the command line, they don't regard the \ before the " as having any kind of escaping effect. This is different from the behaviour of the Windows standard C library when it parses the rest of the command line, which would consider that \" not to close the quoted string.
But this confuses windows::GetCommandLineArguments, because the Windows API function GetCommandLineW() will return a command line containing that \" sequence, and cl::TokenizeWindowsCommandLine will tokenize the whole string according to the C library's rules. So it will misidentify where the program name stops and the arguments start.
To fix this, I've introduced a new variant function cl::TokenizeWindowsCommandLineFull(), intended to be applied to the string returned from GetCommandLineW(). It parses the first word of the command line according to CreateProcess's rules, considering \ to never be an escaping character; thereafter, it switches over to the C library rules for the rest of the command line.
Reviewed By: hans
Differential Revision: https://reviews.llvm.org/D122914
show more ...
|
#
1be024ee |
| 03-May-2022 |
Simon Tatham <simon.tatham@arm.com> |
[Windows] Fix cmd line tokenization of unclosed quotes.
When cl::TokenizeWindowsCommandLine received a command line with an unterminated double-quoted string at the end, it would discard the text wi
[Windows] Fix cmd line tokenization of unclosed quotes.
When cl::TokenizeWindowsCommandLine received a command line with an unterminated double-quoted string at the end, it would discard the text within that string. That doesn't match the behavior of the standard Windows C library, which will return the text in the unclosed quoted string as an argv word.
Fixed, and added extra unit tests in that area.
In some cases (specifically the one in Bugzilla #47579) this could cause TokenizeWindowsCommandLine to return a zero-length list of arguments, leading to an array overrun at the call site in windows::GetCommandLineArguments. Added a check there, for extra safety: now windows::GetCommandLineArguments will return an error code instead of failing an assertion.
(This change was written as part of https://reviews.llvm.org/D122914, but split into a separate commit at the last minute at the code reviewer's suggestion, because it's fixing an unrelated bug in the same area. The rest of D122914 will follow in the next commit.)
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4 |
|
#
bd0bddc1 |
| 11-Mar-2022 |
Fangrui Song <i@maskray.me> |
[CommandLine] Remove `may only occur zero or one times!` error
Early adoption of new technologies or adjusting certain code generation/IR optimization thresholds is often available through some cl::
[CommandLine] Remove `may only occur zero or one times!` error
Early adoption of new technologies or adjusting certain code generation/IR optimization thresholds is often available through some cl::opt options (which have unstable surfaces). Specifying such an option twice will lead to an error.
``` % clang -c a.c -mllvm -disable-binop-extract-shuffle -mllvm -disable-binop-extract-shuffle clang (LLVM option parsing): for the --disable-binop-extract-shuffle option: may only occur zero or one times! % clang -c a.c -mllvm -hwasan-instrument-reads=0 -mllvm -hwasan-instrument-reads=0 clang (LLVM option parsing): for the --hwasan-instrument-reads option: may only occur zero or one times! % clang -c a.c -mllvm --scalar-evolution-max-arith-depth=32 -mllvm --scalar-evolution-max-arith-depth=16 clang (LLVM option parsing): for the --scalar-evolution-max-arith-depth option: may only occur zero or one times! ```
The option is specified twice, because there is sometimes a global setting and a specific file or project may need to override (or duplicately specify) the value.
The error is contrary to the common practice of getopt/getopt_long command line utilities that let the last option win and the `getLastArg` behavior used by Clang driver options. I have seen such errors for several times. I think the error just makes users inconvenient, while providing very little value on discouraging production usage of unstable surfaces (this goal is itself controversial, because developers might not want to commit to a stable surface too early, or there is just some subtle codegen toggle which is infeasible to have a driver option). Therefore, I suggest we drop the diagnostic, at least before the diagnostic gets sufficiently better support for the overridding needs.
Removing the error is a degraded error checking experience. I think this error checking behavior, if desirable, should be enabled explicitly by tools. Users preferring the behavior can figure out a way to do so.
Reviewed By: jhenderson, rnk
Differential Revision: https://reviews.llvm.org/D120455
show more ...
|
Revision tags: llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
#
3a3cb929 |
| 07-Feb-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use = default (NFC)
|
Revision tags: llvmorg-15-init |
|
#
7c027765 |
| 26-Jan-2022 |
serge-sans-paille <sguelton@redhat.com> |
Fix edb02d8c5df36bb375df7171b4ba61635564dfb4
|