[llvm-commits] [llvm] r64224 - /llvm/trunk/lib/System/Unix/Signals.inc
Dan Gohman
gohman at apple.com
Tue Feb 10 09:56:28 PST 2009
Author: djg
Date: Tue Feb 10 11:56:28 2009
New Revision: 64224
URL: http://llvm.org/viewvc/llvm-project?rev=64224&view=rev
Log:
Use const, to support platforms where strrchr returns a const char *.
This fixes PR3535.
Modified:
llvm/trunk/lib/System/Unix/Signals.inc
Modified: llvm/trunk/lib/System/Unix/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Signals.inc?rev=64224&r1=64223&r2=64224&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Signals.inc (original)
+++ llvm/trunk/lib/System/Unix/Signals.inc Tue Feb 10 11:56:28 2009
@@ -78,7 +78,7 @@
for (int i = 0; i < depth; ++i) {
Dl_info dlinfo;
dladdr(StackTrace[i], &dlinfo);
- char* name = strrchr(dlinfo.dli_fname, '/');
+ const char* name = strrchr(dlinfo.dli_fname, '/');
int nwidth;
if (name == NULL) nwidth = strlen(dlinfo.dli_fname);
@@ -93,7 +93,7 @@
fprintf(stderr, "%-3d", i);
- char* name = strrchr(dlinfo.dli_fname, '/');
+ const char* name = strrchr(dlinfo.dli_fname, '/');
if (name == NULL) fprintf(stderr, " %-*s", width, dlinfo.dli_fname);
else fprintf(stderr, " %-*s", width, name+1);
More information about the llvm-commits
mailing list