[llvm] Create a CharSetConverter class with both iconv and icu support. (PR #138893)

Abhina Sree via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 07:43:44 PDT 2025


================
@@ -0,0 +1,141 @@
+//===-- CharSet.h - Characters set conversion class ---------------*- 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 a utility class to convert between different character
+/// set encodings.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_SUPPORT_CHARSET_H
+#define LLVM_SUPPORT_CHARSET_H
+
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Config/config.h"
+#include "llvm/Support/ErrorOr.h"
+
+#include <string>
+#include <system_error>
+
+namespace llvm {
+
+template <typename T> class SmallVectorImpl;
+
+namespace details {
+class CharSetConverterImplBase {
----------------
abhina-sree wrote:

I did put CharSetConverterImplBase inside the llvm namespace and moved the destructor to cpp as well and still saw the failure. LLVM was able to build, but the unittest showed the error. I haven't been able to figure out how to solve this still

https://github.com/llvm/llvm-project/pull/138893


More information about the llvm-commits mailing list