From c7d0747db112b0a9ca122804ee9b884b97c76e4f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 29 Jun 2025 12:22:21 -0700 Subject: [PATCH] [IR] Remove an unnecessary cast (NFC) C is already of unsigned char. --- llvm/lib/IR/AsmWriter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index ff45afe399c82..af268b4fc6941 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -447,8 +447,7 @@ void llvm::printLLVMNameWithoutPrefix(raw_ostream &OS, StringRef Name) { // in the range 0-255. This is important when building with MSVC because // its implementation will assert. This situation can arise when dealing // with UTF-8 multibyte characters. - if (!isalnum(static_cast(C)) && C != '-' && C != '.' && - C != '_') { + if (!isalnum(C) && C != '-' && C != '.' && C != '_') { NeedsQuotes = true; break; }