[llvm] [Support] Remove an unnecessary cast (NFC) (PR #157312)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 6 13:47:13 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
dli_fname is of type const char *.
---
Full diff: https://github.com/llvm/llvm-project/pull/157312.diff
1 Files Affected:
- (modified) llvm/lib/Support/Unix/Signals.inc (+1-2)
``````````diff
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);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/157312
More information about the llvm-commits
mailing list