[llvm] [TLI] Update `getWCharSize` documentation (PR #213622)

Ömer Sinan Ağacan via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 01:49:16 PDT 2026


https://github.com/osa1 created https://github.com/llvm/llvm-project/pull/213622

`return 0` part of `getWCharSize` was added in cc603ee3d563 but then removed in 5a88dffc40d2. Update the documentation as it no longer returns 0 when the size is unknown (instead returns the default).

>From c32c620a029fc182b7dcab21313c8b22986ef1b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= <omer at osa1.net>
Date: Mon, 3 Aug 2026 09:47:11 +0100
Subject: [PATCH] [TLI] Update `getWCharSize` documentation

`return 0` part of `getWCharSize` was added in cc603ee3d563 but then
removed in 5a88dffc40d2. Update the documentation as it no longer
returns 0 when the size is unknown (instead returns the default).
---
 llvm/include/llvm/Analysis/TargetLibraryInfo.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
index 629b126db17c2..cd61b925ee5d7 100644
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
@@ -230,7 +230,7 @@ class TargetLibraryInfoImpl {
     ShouldSignExtI32Return = Val;
   }
 
-  /// Returns the size of the wchar_t type in bytes or 0 if the size is unknown.
+  /// Returns the size of the wchar_t type in bytes.
   /// This queries the 'wchar_size' metadata.
   LLVM_ABI unsigned getWCharSize(const Module &M) const;
 



More information about the llvm-commits mailing list