[PATCH] D148821: [SystemZ][z/OS] Create utility functions for converting between EBCDIC and UTF-8.

Neumann Hon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 12:15:04 PDT 2023


Everybody0523 added inline comments.


================
Comment at: llvm/lib/Support/ConvertEBCDIC.cpp:100
+
+std::error_code ConverterEBCDIC::convertToUTF8(StringRef Source,
+                                               SmallVectorImpl<char> &Result) {
----------------
efriedma wrote:
> Maybe convertToUTF8 should return void, instead of an std::error_code, because it can't fail.  (The only reason I can think of to keep it is consistency with conversions which can fail.  But that doesn't seem compelling given an explicit entry point like this.)
FWIW I actually did personally prefer the consistency with the reverse direction (which can fail), but I'm open to changing it. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148821/new/

https://reviews.llvm.org/D148821



More information about the llvm-commits mailing list