@@ -64,7 +64,7 @@ class SourceWriter {
6464 // The data might potentially contain newline characters, therefore it will
6565 // be scanned to ensure that each line is indented and prefixed properly,
6666 // making it a bit slower than Append().
67- SourceWriter& Write (const StringPiece & str);
67+ SourceWriter& Write (const absl::string_view & str);
6868
6969 // Writes a source code snippet read from a file.
7070 //
@@ -77,7 +77,7 @@ class SourceWriter {
7777 //
7878 // It is expected that no newline character is present in the data provided,
7979 // otherwise Write() must be used.
80- SourceWriter& Append (const StringPiece & str);
80+ SourceWriter& Append (const absl::string_view & str);
8181
8282 // Appends a type to the current line.
8383 //
@@ -156,7 +156,7 @@ class SourceWriter {
156156 const Javadoc* javadoc = nullptr );
157157
158158 protected:
159- virtual void DoAppend (const StringPiece & str) = 0;
159+ virtual void DoAppend (const absl::string_view & str) = 0;
160160
161161 private:
162162 // A utility base class for visiting elements of a type.
@@ -226,7 +226,7 @@ class SourceFileWriter : public SourceWriter {
226226 virtual ~SourceFileWriter () = default ;
227227
228228 protected:
229- void DoAppend (const StringPiece & str) override {
229+ void DoAppend (const absl::string_view & str) override {
230230 TF_CHECK_OK (file_->Append (str));
231231 }
232232
@@ -246,7 +246,7 @@ class SourceBufferWriter : public SourceWriter {
246246 const string& str () { return *buffer_; }
247247
248248 protected:
249- void DoAppend (const StringPiece & str) override {
249+ void DoAppend (const absl::string_view & str) override {
250250 buffer_->append (str.begin (), str.end ());
251251 }
252252
0 commit comments