summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/TwineTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | 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
* Revert "[ADT] Make Twine's copy constructor private."Zachary Turner2017-10-111-8/+0
| | | | | | | | | | This reverts commit 4e4ee1c507e2707bb3c208e1e1b6551c3015cbf5. This is failing due to some code that isn't built on MSVC so I didn't catch. Not immediately obvious how to fix this at first glance, so I'm reverting for now. llvm-svn: 315536
* [ADT] Make Twine's copy constructor private.Zachary Turner2017-10-111-0/+8
| | | | | | | | | | | | | | | | | There's a lot of misuse of Twine scattered around LLVM. This ranges in severity from benign (returning a Twine from a function by value that is just a string literal) to pretty sketchy (storing a Twine by value in a class). While there are some uses for copying Twines, most of the very compelling ones are confined to the Twine class implementation itself, and other uses are either dubious or easily worked around. This patch makes Twine's copy constructor private, and fixes up all callsites. Differential Revision: https://reviews.llvm.org/D38767 llvm-svn: 315530
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers. No other change was made. I did no manual edits, all of this is clang-format. This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries. llvm-svn: 304786
* Fix compilation.Evgeniy Stepanov2016-12-171-1/+1
| | | | | | | unittests/ADT/TwineTest.cpp:106:38: error: field 'Count' will be initialized after base 'llvm::FormatAdapter<int>' [-Werror,-Wreorder] explicit formatter(int &Count) : Count(Count), FormatAdapter(0) {} llvm-svn: 290029
* Add support for formatv to llvm::Twine.Zachary Turner2016-12-171-1/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D27835 llvm-svn: 290020
* Teach Twine to support SmallString.Yaron Keren2015-03-171-0/+10
| | | | | | | | Enable removing .str() member calls for these frequent cases. http://reviews.llvm.org/D6372 llvm-svn: 232465
* Sort the #include lines for unittest/...Chandler Carruth2012-12-041-1/+1
| | | | llvm-svn: 169250
* Add Twine support for characters, and switch twine to use a union internallyChris Lattner2011-07-241-2/+6
| | | | | | to eliminate some casting. llvm-svn: 135888
* Support/ADT/Twine: Add toNullTerminatedStringRef.Michael J. Spencer2010-12-011-0/+8
| | | | llvm-svn: 120600
* Twine: Use raw_ostream::write_hex, remove unused itohexstr method.Daniel Dunbar2009-07-301-2/+1
| | | | llvm-svn: 77617
* Twine: Provide [u]int{32,64} conversions via implicit constructors instead ofDaniel Dunbar2009-07-301-6/+7
| | | | | | explicitly. llvm-svn: 77576
* fix unittest on platforms with unsigned chars (e.g. linux-ppc)Benjamin Kramer2009-07-291-1/+1
| | | | llvm-svn: 77471
* Twines: Support numeric conversion directly (uitostr, etc).Daniel Dunbar2009-07-291-0/+12
| | | | | | | | | | | | | | | - Provides static constructors for doing number to string conversions without using temporaries. - There are several ways to do this, I think given the Twine constraints this is the simplest one. - One FIXME for fast number -> hex conversion. - Added another comment on one last major bit of perf work Twines need, which is to make raw_svector_ostream more efficient. llvm-svn: 77445
* Add Twine ADT.Daniel Dunbar2009-07-241-0/+63
- Not currently used. llvm-svn: 76956
OpenPOWER on IntegriCloud