//===--- ConvertEBCDIC.cpp - UTF8/EBCDIC CharSet Conversion -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \file /// This file provides utility functions for converting between EBCDIC-1047 and /// UTF-8. /// /// //===----------------------------------------------------------------------===// #include "llvm/Support/ConvertEBCDIC.h" usingnamespacellvm; static const unsigned char ISO88591ToIBM1047[256] = …; static const unsigned char IBM1047ToISO88591[256] = …; std::error_code ConverterEBCDIC::convertToEBCDIC(StringRef Source, SmallVectorImpl<char> &Result) { … } void ConverterEBCDIC::convertToUTF8(StringRef Source, SmallVectorImpl<char> &Result) { … }