[clang] [llvm] Enable fexec-charset option (PR #138895)

Sergei Barannikov via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 10 17:14:22 PST 2026


================
@@ -0,0 +1,40 @@
+//===-- clang/Lex/TextEncodingConfig.h - Text Conversion Config -*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LEX_LITERALCONVERTER_H
+#define LLVM_CLANG_LEX_LITERALCONVERTER_H
+
+#include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/LangOptions.h"
+#include "clang/Basic/TargetInfo.h"
+#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/TextEncoding.h"
+
+enum ConversionAction {
+  CA_NoConversion,
+  CA_ToSystemEncoding,
+  CA_ToExecEncoding
+};
+
+class TextEncodingConfig {
+  llvm::StringRef InternalEncoding;
----------------
s-barannikov wrote:

What is internal encoding used for? If a string literal is "evaluated", we convert it to the execution encoding. Is the internal encoding for the unevaluated string literals or diagnostics or ...?

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


More information about the cfe-commits mailing list