[llvm] [MC] Remove an unnecessary cast (NFC) (PR #146276)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 29 09:37:39 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146276

C is already of unsigned char.


>From 7b2e898a28519ec0a32d5528adccd650bfecd06d Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 28 Jun 2025 20:50:21 -0700
Subject: [PATCH] [MC] Remove an unnecessary cast (NFC)

C is already of unsigned char.
---
 llvm/lib/MC/MCAsmStreamer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 5ce71c024ad64..9c6474ccb6174 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -1221,7 +1221,7 @@ void MCAsmStreamer::PrintQuotedString(StringRef Data, raw_ostream &OS) const {
         continue;
       }
 
-      if (isPrint((unsigned char)C)) {
+      if (isPrint(C)) {
         OS << (char)C;
         continue;
       }



More information about the llvm-commits mailing list