@@ -90,7 +90,6 @@ class CharSetConverterTable : public details::CharSetConverterImplBase {
9090
9191 std::error_code convert (StringRef Source, SmallVectorImpl<char > &Result,
9292 bool ShouldAutoFlush) const override ;
93- std::error_code flush () const override ;
9493};
9594
9695std::error_code CharSetConverterTable::convert (StringRef Source,
@@ -106,10 +105,6 @@ std::error_code CharSetConverterTable::convert(StringRef Source,
106105 return std::error_code ();
107106}
108107
109- std::error_code CharSetConverterTable::flush () const {
110- return std::error_code ();
111- }
112-
113108#ifdef HAVE_ICU
114109class CharSetConverterICU : public details ::CharSetConverterImplBase {
115110 UConverter *FromConvDesc;
@@ -137,7 +132,6 @@ class CharSetConverterICU : public details::CharSetConverterImplBase {
137132
138133 std::error_code convert (StringRef Source, SmallVectorImpl<char > &Result,
139134 bool ShouldAutoFlush) const override ;
140- std::error_code flush () const override ;
141135};
142136
143137std::error_code CharSetConverterICU::convert (StringRef Source,
@@ -180,8 +174,6 @@ std::error_code CharSetConverterICU::convert(StringRef Source,
180174 return std::error_code ();
181175}
182176
183- std::error_code CharSetConverterICU::flush () const { return std::error_code (); }
184-
185177#elif defined(HAVE_ICONV)
186178class CharSetConverterIconv : public details ::CharSetConverterImplBase {
187179 iconv_t ConvDesc;
@@ -191,7 +183,6 @@ class CharSetConverterIconv : public details::CharSetConverterImplBase {
191183
192184 std::error_code convert (StringRef Source, SmallVectorImpl<char > &Result,
193185 bool ShouldAutoFlush) const override ;
194- std::error_code flush () const override ;
195186};
196187
197188std::error_code CharSetConverterIconv::convert (StringRef Source,
@@ -243,14 +234,6 @@ std::error_code CharSetConverterIconv::convert(StringRef Source,
243234 return std::error_code ();
244235}
245236
246- std::error_code CharSetConverterIconv::flush () const {
247- size_t Ret = iconv (ConvDesc, nullptr , nullptr , nullptr , nullptr );
248- if (Ret == static_cast <size_t >(-1 )) {
249- return std::error_code (errno, std::generic_category ());
250- }
251- return std::error_code ();
252- }
253-
254237#endif // HAVE_ICONV
255238} // namespace
256239
0 commit comments