Skip to content

Commit bb65f5a

Browse files
author
Andy Kaylor
authored
Move raw_string_ostream back to raw_ostream.cpp (#79224)
The implementation of raw_string_ostream::write_impl() was moved to raw_socket_stream.cpp when the raw_socket_ostream support was separated. This patch moves it back to facilitate disabling socket support in downstream projects.
1 parent 84dcf3d commit bb65f5a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

llvm/lib/Support/raw_ostream.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,14 @@ bool raw_fd_stream::classof(const raw_ostream *OS) {
954954
return OS->get_kind() == OStreamKind::OK_FDStream;
955955
}
956956

957+
//===----------------------------------------------------------------------===//
958+
// raw_string_ostream
959+
//===----------------------------------------------------------------------===//
960+
961+
void raw_string_ostream::write_impl(const char *Ptr, size_t Size) {
962+
OS.append(Ptr, Size);
963+
}
964+
957965
//===----------------------------------------------------------------------===//
958966
// raw_svector_ostream
959967
//===----------------------------------------------------------------------===//

llvm/lib/Support/raw_socket_stream.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,3 @@ raw_socket_stream::createConnectedUnix(StringRef SocketPath) {
170170

171171
raw_socket_stream::~raw_socket_stream() {}
172172

173-
//===----------------------------------------------------------------------===//
174-
// raw_string_ostream
175-
//===----------------------------------------------------------------------===//
176-
177-
void raw_string_ostream::write_impl(const char *Ptr, size_t Size) {
178-
OS.append(Ptr, Size);
179-
}

0 commit comments

Comments
 (0)