mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
Add an operator+= for appending StringRefs onto std::strings.
Previously this pattern would be compiled using an implicit conversion to std::string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c3c8ea662
commit
6765f78efb
@ -447,6 +447,10 @@ namespace llvm {
|
||||
return LHS.compare(RHS) != -1;
|
||||
}
|
||||
|
||||
inline std::string &operator+=(std::string &buffer, llvm::StringRef string) {
|
||||
return buffer.append(string.data(), string.size());
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
||||
// StringRefs can be treated like a POD type.
|
||||
|
Loading…
x
Reference in New Issue
Block a user