[clang] [llvm] Alisonz/tmp1 (PR #205163)

Alison Zhang via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 22 11:56:03 PDT 2026


================
@@ -857,6 +873,16 @@ class SourceManager : public RefCountedBase<SourceManager> {
 
   FileManager &getFileManager() const { return FileMgr; }
 
+  /// Get or create a text encoding converter from the cache.
+  /// This method manages all converters (input charset and file tag converters)
+  /// in a single cache owned by SourceManager.
+  /// \param SourceEncoding the source character encoding name
+  /// \param TargetEncoding the target character encoding name
+  /// \return pointer to the converter or an error code
+  llvm::ErrorOr<llvm::TextEncodingConverter *>
+  getOrCreateConverter(llvm::StringRef SourceEncoding,
+                       llvm::StringRef TargetEncoding);
----------------
azhan92 wrote:

Change so we don't take TargetEncoding as an argument anymore since it will always be UTF-8

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


More information about the cfe-commits mailing list