#
68169362 |
| 27-Jan-2015 |
Chris Bieneman <beanz@apple.com> |
Re-landing changes to use ArrayRef instead of SmallVectorImpl, and new API test.
This contains the changes from r227148 & r227154, and also fixes to the test case to properly clean up the stack opti
Re-landing changes to use ArrayRef instead of SmallVectorImpl, and new API test.
This contains the changes from r227148 & r227154, and also fixes to the test case to properly clean up the stack options.
llvm-svn: 227255
show more ...
|
#
15ac9363 |
| 27-Jan-2015 |
Richard Trieu <rtrieu@google.com> |
Revert r227148 & r227154 which added a test which infinitely loops.
r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly outputs two following lines:
-tool: CommandLine Err
Revert r227148 & r227154 which added a test which infinitely loops.
r227148 added test CommandLineTest.HideUnrelatedOptionsMulti which repeatedly outputs two following lines:
-tool: CommandLine Error: Option 'test-option-1' registered more than once! -tool: CommandLine Error: Option 'test-option-2' registered more than once!
r227154 depends on changes from r227148
llvm-svn: 227167
show more ...
|
#
fd3dbd94 |
| 27-Jan-2015 |
Chris Bieneman <beanz@apple.com> |
One more fix to the new API to fix const-correctness.
llvm-svn: 227154
|
#
c333e577 |
| 26-Jan-2015 |
Chris Bieneman <beanz@apple.com> |
Pete Cooper suggested the new API should use ArrayRef instead of SmallVectorImpl. Also adding a test case.
llvm-svn: 227148
|
#
01043257 |
| 26-Jan-2015 |
Chris Bieneman <beanz@apple.com> |
Add new HideUnrelatedOptions API that takes a SmallVectorImpl.
Need a new API for clang-modernize that allows specifying a list of option categories to remain visible. This will allow clang-moderniz
Add new HideUnrelatedOptions API that takes a SmallVectorImpl.
Need a new API for clang-modernize that allows specifying a list of option categories to remain visible. This will allow clang-modernize to move off getRegisteredOptions.
llvm-svn: 227140
show more ...
|
#
831fc5e8 |
| 26-Jan-2015 |
Chris Bieneman <beanz@apple.com> |
Putting all the standard tool options into a "Generic" category.
Summary: This puts all the options that CommandLine.cpp implements into a category so that the APIs to hide options can not hide base
Putting all the standard tool options into a "Generic" category.
Summary: This puts all the options that CommandLine.cpp implements into a category so that the APIs to hide options can not hide based on the generic category instead of string matching a partial list of argument strings.
This patch is pretty simple and straight forward but it does impact the -help output of all tools using cl::opt. Specifically the options implemented in CommandLine.cpp (help, help-list, help-hidden, help-list-hidden, print-options, print-all-options, version) are all grouped together into an Option category, and these options are never hidden by the cl::HideUnrelatedOptions API.
Reviewers: dexonsmith, chandlerc, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7150
llvm-svn: 227093
show more ...
|
#
a8cf495a |
| 24-Jan-2015 |
Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> |
If we see UTF-8 BOM sequence at the beginning of a response file, we shall remove these bytes before parsing.
Phabricator Revision: http://reviews.llvm.org/D7156
llvm-svn: 226988
|
#
9e13af7a |
| 21-Jan-2015 |
Chris Bieneman <beanz@apple.com> |
Adding a new cl::HideUnrelatedOptions API to allow clang to migrate off cl::getRegisteredOptions.
Summary: cl::getRegisteredOptions really exposes some of the innards of how command line parsing is
Adding a new cl::HideUnrelatedOptions API to allow clang to migrate off cl::getRegisteredOptions.
Summary: cl::getRegisteredOptions really exposes some of the innards of how command line parsing is implemented. Exposing new APIs that allow us to disentangle client code from implementation details will allow us to make more extensive changes to command line parsing.
Reviewers: chandlerc, dexonsmith, beanz
Reviewed By: dexonsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7100
llvm-svn: 226729
show more ...
|
Revision tags: llvmorg-3.6.0-rc1 |
|
#
5d23224f |
| 13-Jan-2015 |
Chris Bieneman <beanz@apple.com> |
Running clang-format on CommandLine.h and CommandLine.cpp.
No functional changes, I'm just going to be doing a lot of work in these files and it would be helpful if they had more current LLVM style.
Running clang-format on CommandLine.h and CommandLine.cpp.
No functional changes, I'm just going to be doing a lot of work in these files and it would be helpful if they had more current LLVM style.
llvm-svn: 225817
show more ...
|
Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2 |
|
#
4e654cd6 |
| 11-Dec-2014 |
Michael Ilseman <milseman@apple.com> |
Silence static analyzer warnings in LLVMSupport.
The static analyzer catches a few potential bugs in LLVMSupport. Add in asserts to silence the warnings.
llvm-svn: 224044
|
Revision tags: llvmorg-3.5.1-rc1 |
|
#
70573dcd |
| 19-Nov-2014 |
David Blaikie <dblaikie@gmail.com> |
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container inse
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container insert function.
This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions...
llvm-svn: 222334
show more ...
|
#
5106ce78 |
| 19-Nov-2014 |
David Blaikie <dblaikie@gmail.com> |
Remove StringMap::GetOrCreateValue in favor of StringMap::insert
Having two ways to do this doesn't seem terribly helpful and consistently using the insert version (which we already has) seems like
Remove StringMap::GetOrCreateValue in favor of StringMap::insert
Having two ways to do this doesn't seem terribly helpful and consistently using the insert version (which we already has) seems like it'll make the code easier to understand to anyone working with standard data structures. (I also updated many references to the Entry's key and value to use first() and second instead of getKey{Data,Length,} and get/setValue - for similar consistency)
Also removes the GetOrCreateValue functions so there's less surface area to StringMap to fix/improve/change/accommodate move semantics, etc.
llvm-svn: 222319
show more ...
|
#
e1863193 |
| 16-Oct-2014 |
Peter Collingbourne <peter@pcc.me.uk> |
Introduce LLVMParseCommandLineOptions C API function.
llvm-svn: 219975
|
#
732e0aa9 |
| 15-Oct-2014 |
Chris Bieneman <beanz@apple.com> |
Defining a new API for debug options that doesn't rely on static global cl::opts.
Summary: This is based on the discussions from the LLVMDev thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-A
Defining a new API for debug options that doesn't rely on static global cl::opts.
Summary: This is based on the discussions from the LLVMDev thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075886.html
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5389
llvm-svn: 219854
show more ...
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4 |
|
#
e3f146d9 |
| 22-Aug-2014 |
Reid Kleckner <reid@kleckner.net> |
Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind
This patch contains the LLVM side of the fix of PR17239.
This bug that happens because the /link (clang-cl.exe argument)
Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind
This patch contains the LLVM side of the fix of PR17239.
This bug that happens because the /link (clang-cl.exe argument) is marked as "consume all remaining arguments". However, when inside a response file, /link should only consume all remaining arguments inside the response file where it is located, not the entire command line after expansion.
My patch will change the semantics of the RemainingArgsClass kind to always consume only until the end of the response file when the option originally came from a response file. There are only two options in this class: dash dash (--) and /link.
Reviewed By: rnk
Differential Revision: http://reviews.llvm.org/D4899
Patch by Rafael Auler!
llvm-svn: 216280
show more ...
|
Revision tags: llvmorg-3.5.0-rc3 |
|
#
db794849 |
| 15-Aug-2014 |
Sean Silva <chisophugis@gmail.com> |
Revert "[Support] Promote cl::StringSaver to a separate utility"
This reverts commit r215784 / 3f8a26f6fe16cc76c98ab21db2c600bd7defbbaa.
LLD has 3 StringSaver's, one of which takes a lock when savi
Revert "[Support] Promote cl::StringSaver to a separate utility"
This reverts commit r215784 / 3f8a26f6fe16cc76c98ab21db2c600bd7defbbaa.
LLD has 3 StringSaver's, one of which takes a lock when saving the string... Need to investigate more closely.
llvm-svn: 215790
show more ...
|
#
42ec6fdf |
| 15-Aug-2014 |
Sean Silva <chisophugis@gmail.com> |
[Support] Promote cl::StringSaver to a separate utility
This class is generally useful.
In breaking it out, the primary change is that it has been made non-virtual. It seems like being abstract led
[Support] Promote cl::StringSaver to a separate utility
This class is generally useful.
In breaking it out, the primary change is that it has been made non-virtual. It seems like being abstract led to there being 3 different (2 in llvm + 1 in clang) concrete implementations which disagreed about the ownership of the saved strings (see the manual call to free() in the unittest StrDupSaver; yes this is different from the CommandLine.cpp StrDupSaver which owns the stored strings; which is different from Clang's StringSetSaver which just holds a reference to a std::set<std::string> which owns the strings).
I've identified 2 other places in the codebase that are open-coding this pattern:
memcpy(Alloc.Allocate<char>(strlen(S)+1), S, strlen(S)+1)
I'll be switching them over. They are * llvm::sys::Process::GetArgumentVector * The StringAllocator member of YAMLIO's Input class This also will allow simplifying Clang's driver.cpp quite a bit.
Let me know if there are any other places that could benefit from StringSaver. I'm also thinking of adding a saveStringRef member for getting a stable StringRef.
llvm-svn: 215784
show more ...
|
Revision tags: llvmorg-3.5.0-rc2 |
|
#
3f6481d0 |
| 01-Aug-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove some calls to std::move.
Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it.
Thanks to David Blaikie for the suggestion.
llvm-svn: 214516
|
Revision tags: llvmorg-3.5.0-rc1 |
|
#
973b2ff3 |
| 14-Jul-2014 |
Justin Bogner <mail@justinbogner.com> |
Support: Use a range-based for
llvm-svn: 212973
|
#
adf21f2a |
| 06-Jul-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Update the MemoryBuffer API to use ErrorOr.
llvm-svn: 212405
|
#
e69170a1 |
| 26-Jun-2014 |
Alp Toker <alp@nuanti.com> |
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754.
llvm-svn: 211814
|
#
61471738 |
| 26-Jun-2014 |
Alp Toker <alp@nuanti.com> |
Introduce a string_ostream string builder facilty
string_ostream is a safe and efficient string builder that combines opaque stack storage with a built-in ostream interface.
small_string_ostream<by
Introduce a string_ostream string builder facilty
string_ostream is a safe and efficient string builder that combines opaque stack storage with a built-in ostream interface.
small_string_ostream<bytes> additionally permits an explicit stack storage size other than the default 128 bytes to be provided. Beyond that, storage is transferred to the heap.
This convenient class can be used in most places an std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair would previously have been used, in order to guarantee consistent access without byte truncation.
The patch also converts much of LLVM to use the new facility. These changes include several probable bug fixes for truncated output, a programming error that's no longer possible with the new interface.
llvm-svn: 211749
show more ...
|
#
fb39de3b |
| 19-Jun-2014 |
Alp Toker <alp@nuanti.com> |
CommandLine: bail out when options get multiply registered
These errors are strictly unrecoverable and indicate serious issues such as conflicting option names or an incorrectly linked LLVM distribu
CommandLine: bail out when options get multiply registered
These errors are strictly unrecoverable and indicate serious issues such as conflicting option names or an incorrectly linked LLVM distribution.
With this change, the errors actually get detected so tests don't pass silently.
llvm-svn: 211260
show more ...
|
#
581b5924 |
| 17-Jun-2014 |
Justin Bogner <mail@justinbogner.com> |
tools: Add a space between package version and LLVM_VERSION_INFO
This reads a little strangely. Add a space to clean it up.
llvm-svn: 211090
|
#
a6e9c3e4 |
| 12-Jun-2014 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove system_error.h.
This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch.
llvm-svn: 210803
|