diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index 1766d2b9f2d..dcc6aa2897c 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -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.