[llvm] [Support] Remove an unnecessary cast (NFC) (PR #157312)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 6 13:46:44 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/157312
dli_fname is of type const char *.
>From 6fda7caffa1d0073e8a5d68797da25319c0bc6f5 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 5 Sep 2025 23:26:17 -0700
Subject: [PATCH] [Support] Remove an unnecessary cast (NFC)
dli_fname is of type const char *.
---
llvm/lib/Support/Unix/Signals.inc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
index 6cd38aabc734e..573ad82f2dea4 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -883,8 +883,7 @@ void llvm::sys::PrintStackTrace(raw_ostream &OS, int Depth) {
} else {
const char *name = strrchr(dlinfo.dli_fname, '/');
if (!name)
- OS << format(" %-*s", width,
- static_cast<const char *>(dlinfo.dli_fname));
+ OS << format(" %-*s", width, dlinfo.dli_fname);
else
OS << format(" %-*s", width, name + 1);
}
More information about the llvm-commits
mailing list