[llvm] 6a83a84 - [IR] Remove an unnecessary cast (NFC) (#146381)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 30 10:42:27 PDT 2025
Author: Kazu Hirata
Date: 2025-06-30T10:42:24-07:00
New Revision: 6a83a84ac52a19d8207a053b6c4eeed2c146626f
URL: https://github.com/llvm/llvm-project/commit/6a83a84ac52a19d8207a053b6c4eeed2c146626f
DIFF: https://github.com/llvm/llvm-project/commit/6a83a84ac52a19d8207a053b6c4eeed2c146626f.diff
LOG: [IR] Remove an unnecessary cast (NFC) (#146381)
C is already of unsigned char.
Added:
Modified:
llvm/lib/IR/AsmWriter.cpp
Removed:
################################################################################
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<unsigned char>(C)) && C != '-' && C != '.' &&
- C != '_') {
+ if (!isalnum(C) && C != '-' && C != '.' && C != '_') {
NeedsQuotes = true;
break;
}
More information about the llvm-commits
mailing list