Skip to content

Commit aaa8a55

Browse files
committed
remove other flush function as well
1 parent 51bfc07 commit aaa8a55

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

llvm/include/llvm/Support/CharSet.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class CharSetConverterImplBase {
6262
/// If the destination character set is a stateful character set,
6363
/// set the shift state to the initial state.
6464
/// Otherwise this is a no-op.
65-
virtual std::error_code flush() const = 0;
6665
};
6766
} // namespace details
6867

@@ -135,8 +134,6 @@ class CharSetConverter {
135134
return std::string(Result);
136135
return EC;
137136
}
138-
139-
std::error_code flush() const { return Converter->flush(); }
140137
};
141138

142139
} // namespace llvm

llvm/lib/Support/CharSet.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

9695
std::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
114109
class 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

143137
std::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)
186178
class 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

197188
std::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

Comments
 (0)