summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-02-10 17:56:28 +0000
committerDan Gohman <gohman@apple.com>2009-02-10 17:56:28 +0000
commit1f517dd1c4855ffee1370ece9179f380437083e6 (patch)
tree05d20f64f5316d5826e5af4471ea69928c4dda3d /llvm/lib/System/Unix
parent8133879c5ec09e97bf4a8a8b0daac83317e5ab9b (diff)
downloadbcm5719-llvm-1f517dd1c4855ffee1370ece9179f380437083e6.tar.gz
bcm5719-llvm-1f517dd1c4855ffee1370ece9179f380437083e6.zip
Use const, to support platforms where strrchr returns a const char *.
This fixes PR3535. llvm-svn: 64224
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r--llvm/lib/System/Unix/Signals.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/System/Unix/Signals.inc b/llvm/lib/System/Unix/Signals.inc
index 9c1050cf8a0..e42841263ea 100644
--- a/llvm/lib/System/Unix/Signals.inc
+++ b/llvm/lib/System/Unix/Signals.inc
@@ -78,7 +78,7 @@ static void PrintStackTrace() {
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 @@ static void PrintStackTrace() {
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);
OpenPOWER on IntegriCloud