summaryrefslogtreecommitdiffstats
path: root/llvm/runtime/libprofile/GCDAProfiling.c
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-05-05 23:52:18 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-05-05 23:52:18 +0000
commita7028848a1d413ad846a61e9f1b9969377220364 (patch)
tree96bf24c03903c7b88d5065ffea37eae59477743d /llvm/runtime/libprofile/GCDAProfiling.c
parentb2dcc36c051daf1f2fbc39068ca3593849e845e8 (diff)
downloadbcm5719-llvm-a7028848a1d413ad846a61e9f1b9969377220364.tar.gz
bcm5719-llvm-a7028848a1d413ad846a61e9f1b9969377220364.zip
The computation of string length is not that complicated. Fix it, again. :)
llvm-svn: 130967
Diffstat (limited to 'llvm/runtime/libprofile/GCDAProfiling.c')
-rw-r--r--llvm/runtime/libprofile/GCDAProfiling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/runtime/libprofile/GCDAProfiling.c b/llvm/runtime/libprofile/GCDAProfiling.c
index 8ab42276003..5af94becfe2 100644
--- a/llvm/runtime/libprofile/GCDAProfiling.c
+++ b/llvm/runtime/libprofile/GCDAProfiling.c
@@ -49,7 +49,7 @@ static void write_int64(uint64_t i) {
}
static uint32_t length_of_string(const char *s) {
- return (strlen(s) + 5) / 4;
+ return (strlen(s) / 4) + 1;
}
static void write_string(const char *s) {
OpenPOWER on IntegriCloud