aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/include/llvm/ADT/SmallString.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/include/llvm/ADT/SmallString.h
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/ADT/SmallString.h')
-rw-r--r--contrib/libs/llvm12/include/llvm/ADT/SmallString.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/contrib/libs/llvm12/include/llvm/ADT/SmallString.h b/contrib/libs/llvm12/include/llvm/ADT/SmallString.h
index 889e6c8f78..0a4b60df10 100644
--- a/contrib/libs/llvm12/include/llvm/ADT/SmallString.h
+++ b/contrib/libs/llvm12/include/llvm/ADT/SmallString.h
@@ -37,12 +37,12 @@ public:
/// Initialize from a StringRef.
SmallString(StringRef S) : SmallVector<char, InternalLen>(S.begin(), S.end()) {}
- /// Initialize by concatenating a list of StringRefs.
- SmallString(std::initializer_list<StringRef> Refs)
- : SmallVector<char, InternalLen>() {
- this->append(Refs);
- }
-
+ /// Initialize by concatenating a list of StringRefs.
+ SmallString(std::initializer_list<StringRef> Refs)
+ : SmallVector<char, InternalLen>() {
+ this->append(Refs);
+ }
+
/// Initialize with a range.
template<typename ItTy>
SmallString(ItTy S, ItTy E) : SmallVector<char, InternalLen>(S, E) {}
@@ -51,42 +51,42 @@ public:
/// @name String Assignment
/// @{
- using SmallVector<char, InternalLen>::assign;
+ using SmallVector<char, InternalLen>::assign;
/// Assign from a StringRef.
void assign(StringRef RHS) {
- SmallVectorImpl<char>::assign(RHS.begin(), RHS.end());
+ SmallVectorImpl<char>::assign(RHS.begin(), RHS.end());
}
- /// Assign from a list of StringRefs.
- void assign(std::initializer_list<StringRef> Refs) {
+ /// Assign from a list of StringRefs.
+ void assign(std::initializer_list<StringRef> Refs) {
this->clear();
- append(Refs);
+ append(Refs);
}
/// @}
/// @name String Concatenation
/// @{
- using SmallVector<char, InternalLen>::append;
+ using SmallVector<char, InternalLen>::append;
/// Append from a StringRef.
void append(StringRef RHS) {
SmallVectorImpl<char>::append(RHS.begin(), RHS.end());
}
- /// Append from a list of StringRefs.
- void append(std::initializer_list<StringRef> Refs) {
- size_t SizeNeeded = this->size();
- for (const StringRef &Ref : Refs)
- SizeNeeded += Ref.size();
- this->reserve(SizeNeeded);
- auto CurEnd = this->end();
- for (const StringRef &Ref : Refs) {
- this->uninitialized_copy(Ref.begin(), Ref.end(), CurEnd);
- CurEnd += Ref.size();
- }
- this->set_size(SizeNeeded);
+ /// Append from a list of StringRefs.
+ void append(std::initializer_list<StringRef> Refs) {
+ size_t SizeNeeded = this->size();
+ for (const StringRef &Ref : Refs)
+ SizeNeeded += Ref.size();
+ this->reserve(SizeNeeded);
+ auto CurEnd = this->end();
+ for (const StringRef &Ref : Refs) {
+ this->uninitialized_copy(Ref.begin(), Ref.end(), CurEnd);
+ CurEnd += Ref.size();
+ }
+ this->set_size(SizeNeeded);
}
/// @}
@@ -280,9 +280,9 @@ public:
}
// Extra operators.
- SmallString &operator=(StringRef RHS) {
- this->assign(RHS);
- return *this;
+ SmallString &operator=(StringRef RHS) {
+ this->assign(RHS);
+ return *this;
}
SmallString &operator+=(StringRef RHS) {