================
@@ -847,7 +847,11 @@ void llvm::sys::PrintStackTrace(raw_ostream &OS, int 
Depth) {
 
     const char *name = strrchr(dlinfo.dli_fname, '/');
     if (!name)
+#ifdef __CYGWIN__
+      OS << format(" %-*s", width, &dlinfo.dli_fname);
----------------
mati865 wrote:

Simple cast results in a warning on Linux:
```
/home/mateusz/Projects/llvm-project/llvm/lib/Support/Unix/Signals.inc:850:36: 
warning: cast from type ‘const char*’ to type ‘char*’ casts away qualifiers 
[-Wcast-qual]
  850 |       OS << format(" %-*s", width, (char *)dlinfo.dli_fname);
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~
```
I'll restore ifdef version.

https://github.com/llvm/llvm-project/pull/134494
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to