Revision tags: llvmorg-11.0.1-rc1, 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, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, 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 |
|
#
2e497796 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[ADT] Implicitly convert between StringRef and std::string_view when we have C++17
This makes the types almost seamlessly interchangeable in C++17 codebases. Eventually we want to replace StringRef
[ADT] Implicitly convert between StringRef and std::string_view when we have C++17
This makes the types almost seamlessly interchangeable in C++17 codebases. Eventually we want to replace StringRef with the standard type, but that requires C++17 being the default and a huge refactoring job as StringRef has a lot more functionality.
show more ...
|
Revision tags: llvmorg-11-init |
|
#
92b68c19 |
| 01-Jan-2020 |
Alexandre Ganea <alexandre.ganea@ubisoft.com> |
[polly][Support] Un-break polly tests Previously, the polly unit tests were stuck in a infinite loop. There was an edge case in StringRef::count() introduced by 9f6b13e5cce96066d7262d224c971d93c27247
[polly][Support] Un-break polly tests Previously, the polly unit tests were stuck in a infinite loop. There was an edge case in StringRef::count() introduced by 9f6b13e5cce96066d7262d224c971d93c2724795, where an empty 'Str' would cause the function to never exit. Also fixed usage in polly.
show more ...
|
#
9f6b13e5 |
| 24-Dec-2019 |
Johannes Doerfert <johannes@jdoerfert.de> |
[Support] Fix behavior of StringRef::count with overlapping occurrences, add tests
Summary: Fix the behavior of StringRef::count(StringRef) to not count overlapping occurrences, as is stated in the
[Support] Fix behavior of StringRef::count with overlapping occurrences, add tests
Summary: Fix the behavior of StringRef::count(StringRef) to not count overlapping occurrences, as is stated in the documentation. Fixes bug https://bugs.llvm.org/show_bug.cgi?id=44072
I added Krzysztof Parzyszek to review this change because a use of this function in HexagonInstrInfo::getInlineAsmLength might depend on the overlapping-behavior. I don't have enough domain knowledge to tell if this change could break anything there.
All other uses of this method in LLVM (besides the unit tests) only use single-character search strings. In those cases, search occurrences can not overlap anyway.
Patch by Benno (@Bensge)
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D70585
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
#
db765889 |
| 11-Dec-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[StringRef] Test all default characters in unit test
The default characters for trim, ltrim and rtrim are " \t\n\v\f\r" but only spaces were tested. Test that the others are trimmed as well.
|
Revision tags: llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3 |
|
#
57effbda |
| 26-Aug-2019 |
Benjamin Kramer <benny.kra@googlemail.com> |
[ADT] Make StringRef(const char*) constexpr
This should let us get rid of StringLiteral in the long term and avoid chasing accidental StringRef globals once and for all.
This requires C++14, I godb
[ADT] Make StringRef(const char*) constexpr
This should let us get rid of StringLiteral in the long term and avoid chasing accidental StringRef globals once and for all.
This requires C++14, I godbolted it on every compiler I know we support so I hope there won't be much fallout.
llvm-svn: 369961
show more ...
|
#
a451156b |
| 21-Aug-2019 |
Sam McCall <sam.mccall@gmail.com> |
reland [gtest] Fix printing of StringRef and SmallString in assert messages.
Renames GTEST_NO_LLVM_RAW_OSTREAM -> GTEST_NO_LLVM_SUPPORT and guards the new features behind it.
This reverts commit a0
reland [gtest] Fix printing of StringRef and SmallString in assert messages.
Renames GTEST_NO_LLVM_RAW_OSTREAM -> GTEST_NO_LLVM_SUPPORT and guards the new features behind it.
This reverts commit a063bcf3ef5a879adbe9639a3c187d876eee0e66.
llvm-svn: 369527
show more ...
|
#
e7c0356b |
| 21-Aug-2019 |
Sam McCall <sam.mccall@gmail.com> |
Revert "[gtest] Fix printing of StringRef and SmallString in assert messages."
This reverts commit 4becb2ab4e9f52ce98272d1f5930d6942af5172b.
llvm-svn: 369525
|
#
2fe9ce60 |
| 21-Aug-2019 |
Sam McCall <sam.mccall@gmail.com> |
[gtest] Fix printing of StringRef and SmallString in assert messages.
Summary: These are detected by gtest as containers, and so previously printed as e.g. { '.' (46, 0x2E), 's' (115, 0x73), 'e' (
[gtest] Fix printing of StringRef and SmallString in assert messages.
Summary: These are detected by gtest as containers, and so previously printed as e.g. { '.' (46, 0x2E), 's' (115, 0x73), 'e' (101, 0x65), 'c' (99, 0x63), '0' (48, 0x30) },
gtest itself overloads PrintTo for std::string and friends, we use the same mechanism.
Reviewers: labath
Subscribers: dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66520
llvm-svn: 369518
show more ...
|
Revision tags: llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4 |
|
#
e995ce54 |
| 09-Jul-2019 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[ADT] Enable ArrayRef/StringRef is_assignable tests on MSVC
Now that we've dropped VS2015 support (D64326) we can enable these static_asserts on MSVC builds as VS2017+ correctly handles them
llvm-s
[ADT] Enable ArrayRef/StringRef is_assignable tests on MSVC
Now that we've dropped VS2015 support (D64326) we can enable these static_asserts on MSVC builds as VS2017+ correctly handles them
llvm-svn: 365471
show more ...
|
Revision tags: llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
be88539b |
| 20-Jan-2019 |
Serge Guelton <sguelton@quarkslab.com> |
Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...>
As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for isPodLike<std::pair<...>> did not match the expectat
Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...>
As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for isPodLike<std::pair<...>> did not match the expectation of std::is_trivially_copyable which makes the memcpy optimization invalid.
This patch renames the llvm::isPodLike trait into llvm::is_trivially_copyable. Unfortunately std::is_trivially_copyable is not portable across compiler / STL versions. So a portable version is provided too.
Note that the following specialization were invalid:
std::pair<T0, T1> llvm::Optional<T>
Tests have been added to assert that former specialization are respected by the standard usage of llvm::is_trivially_copyable, and that when a decent version of std::is_trivially_copyable is available, llvm::is_trivially_copyable is compared to std::is_trivially_copyable.
As of this patch, llvm::Optional is no longer considered trivially copyable, even if T is. This is to be fixed in a later patch, as it has impact on a long-running bug (see r347004)
Note that GCC warns about this UB, but this got silented by https://reviews.llvm.org/D50296.
Differential Revision: https://reviews.llvm.org/D54472
llvm-svn: 351701
show more ...
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3 |
|
#
945c481a |
| 08-Jun-2018 |
Henry Wong <movietravelcode@outlook.com> |
[ADT] Add `StringRef::rsplit(StringRef Separator)`.
Summary: Add `StringRef::rsplit(StringRef Separator)` to achieve the function of getting the tail substring according to the separator. A typical
[ADT] Add `StringRef::rsplit(StringRef Separator)`.
Summary: Add `StringRef::rsplit(StringRef Separator)` to achieve the function of getting the tail substring according to the separator. A typical usage is to get `data` in `std::basic_string::data`.
Reviewers: mehdi_amini, zturner, beanz, xbolva00, vsk
Reviewed By: zturner, xbolva00, vsk
Subscribers: vsk, xbolva00, llvm-commits, MTC
Differential Revision: https://reviews.llvm.org/D47406
llvm-svn: 334283
show more ...
|
Revision tags: llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2 |
|
#
60707939 |
| 02-Feb-2018 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix incorrect usage of std::is_assignable.
We want to check that we can assign to an lvalue here, not a prvalue.
llvm-svn: 324152
|
Revision tags: llvmorg-6.0.0-rc1 |
|
#
768d6dd0 |
| 19-Dec-2017 |
Serguei Katkov <serguei.katkov@azul.com> |
Fix APFloat from string conversion for Inf
The method IEEEFloat::convertFromStringSpecials() does not recognize the "+Inf" and "-Inf" strings but these strings are printed for the double Infinities
Fix APFloat from string conversion for Inf
The method IEEEFloat::convertFromStringSpecials() does not recognize the "+Inf" and "-Inf" strings but these strings are printed for the double Infinities by the IEEEFloat::toString().
This patch adds the "+Inf" and "-Inf" strings to the list of recognized patterns in IEEEFloat::convertFromStringSpecials().
Re-landing after fix.
Reviewers: sberg, bogner, majnemer, timshen, rnk, skatkov, gottesmm, bkramer, scanon, anna Reviewed By: anna Subscribers: mkazantsev, FlameTop, llvm-commits, reames, apilipenko Differential Revision: https://reviews.llvm.org/D38030
llvm-svn: 321054
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
fcae62d6 |
| 15-Jun-2017 |
Galina Kistanova <gkistanova@gmail.com> |
Added braces to work around gcc warning in googletest: suggest explicit braces to avoid ambiguous 'else'. NFC.
llvm-svn: 305506
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1 |
|
#
3aa1d004 |
| 14-Apr-2017 |
Alex Denisov <1101.debian@gmail.com> |
Add more test cases for StringRef::edit_distance
Example strings taken from here: http://www.let.rug.nl/~kleiweg/lev/
llvm-svn: 300312
|
#
f4bbdc29 |
| 21-Mar-2017 |
Zachary Turner <zturner@google.com> |
[ADT] Add a version of llvm::join() that takes a range.
llvm-svn: 298427
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3 |
|
#
8bd42a1a |
| 14-Feb-2017 |
Zachary Turner <zturner@google.com> |
[Support] Add StringRef::getAsDouble.
Differential Revision: https://reviews.llvm.org/D29918
llvm-svn: 295089
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1 |
|
#
bc48d20e |
| 13-Dec-2016 |
Zachary Turner <zturner@google.com> |
[ADT] Add llvm::StringLiteral.
StringLiteral is a wrapper around a string literal useful for replacing global tables of char arrays with global tables of StringRefs that can initialized in a constex
[ADT] Add llvm::StringLiteral.
StringLiteral is a wrapper around a string literal useful for replacing global tables of char arrays with global tables of StringRefs that can initialized in a constexpr context, avoiding the invocation of a global constructor.
Differential Revision: https://reviews.llvm.org/D27686
llvm-svn: 289551
show more ...
|
Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
17412b03 |
| 12-Nov-2016 |
Zachary Turner <zturner@google.com> |
[Support] Add StringRef::find_lower and contains_lower.
Differential Revision: https://reviews.llvm.org/D25299
llvm-svn: 286724
|
#
5caae908 |
| 07-Nov-2016 |
Jordan Rose <jordan_rose@apple.com> |
Add tests for r286139.
llvm-svn: 286141
|
#
c3618896 |
| 25-Sep-2016 |
Zachary Turner <zturner@google.com> |
Fix signed / unsigned comparison.
llvm-svn: 282348
|
#
84505f9a |
| 25-Sep-2016 |
Zachary Turner <zturner@google.com> |
Add some predicated searching functions to StringRef.
This adds 4 new functions to StringRef, which can be used to take or drop characters while a certain condition is met, or until a certain condit
Add some predicated searching functions to StringRef.
This adds 4 new functions to StringRef, which can be used to take or drop characters while a certain condition is met, or until a certain condition is met. They are:
take_while - Return characters until a condition is not met. take_until - Return characters until a condition is met. drop_while - Remove characters until a condition is not met. drop_until - Remove characters until a condition is met.
Internally, all of these functions delegate to two additional helper functions which can be used to search for the position of a character meeting or not meeting a condition, which are:
find_if - Find the first character matching a predicate. find_if_not - Find the first character not matching a predicate.
Differential Revision: https://reviews.llvm.org/D24842
llvm-svn: 282346
show more ...
|
#
aec851ce |
| 22-Sep-2016 |
Zachary Turner <zturner@google.com> |
Fix build breakage due to typo in cast.
llvm-svn: 282183
|
#
d5d57635 |
| 22-Sep-2016 |
Zachary Turner <zturner@google.com> |
Speculative fix for build failures due to consumeInteger.
A recent patch added support for consumeInteger() and made getAsInteger delegate to this function. A few buildbots are failing as a result
Speculative fix for build failures due to consumeInteger.
A recent patch added support for consumeInteger() and made getAsInteger delegate to this function. A few buildbots are failing as a result with an assertion failure. On a hunch, I tested what happens if I call getAsInteger() on an empty string, and sure enough it crashes the same way that the buildbots are crashing.
I confirmed that getAsInteger() on an empty string did not crash before my patch, so I suspect this to be the cause.
I also added a unit test for the empty string.
llvm-svn: 282170
show more ...
|