Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

C is already of unsigned char.

C is already of unsigned char.
@llvmbot llvmbot added the mc Machine (object) code label Jun 29, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 29, 2025

@llvm/pr-subscribers-mc

Author: Kazu Hirata (kazutakahirata)

Changes

C is already of unsigned char.


Full diff: https://github.com/llvm/llvm-project/pull/146276.diff

1 Files Affected:

  • (modified) llvm/lib/MC/MCAsmStreamer.cpp (+1-1)
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;
       }

@kazutakahirata kazutakahirata merged commit 75f359d into llvm:main Jun 29, 2025
9 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250629_cast_llvm_MC branch June 29, 2025 22:41
rlavaee pushed a commit to rlavaee/llvm-project that referenced this pull request Jul 1, 2025
rlavaee pushed a commit to rlavaee/llvm-project that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants