[llvm] 37a1fc5 - [Support] Remove an unnecessary cast (NFC) (#157312)

via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 6 17:11:28 PDT 2025


Author: Kazu Hirata
Date: 2025-09-06T17:11:24-07:00
New Revision: 37a1fc52a5a8d2fefc477c4435947386bf16c100

URL: https://github.com/llvm/llvm-project/commit/37a1fc52a5a8d2fefc477c4435947386bf16c100
DIFF: https://github.com/llvm/llvm-project/commit/37a1fc52a5a8d2fefc477c4435947386bf16c100.diff

LOG: [Support] Remove an unnecessary cast (NFC) (#157312)

dli_fname is of type const char *.

Added: 
    

Modified: 
    llvm/lib/Support/Unix/Signals.inc

Removed: 
    


################################################################################
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