diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-05-05 23:52:18 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-05-05 23:52:18 +0000 |
commit | a7028848a1d413ad846a61e9f1b9969377220364 (patch) | |
tree | 96bf24c03903c7b88d5065ffea37eae59477743d /llvm/lib/Transforms | |
parent | b2dcc36c051daf1f2fbc39068ca3593849e845e8 (diff) | |
download | bcm5719-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/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 23427f77e9b..13eecb7f6c3 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -140,7 +140,7 @@ namespace { // A GCOV string is a length, followed by a NUL, then between 0 and 3 NULs // padding out to the next 4-byte word. The length is measured in 4-byte // words including padding, not bytes of actual string. - return (s.size() + 5) / 4; + return (s.size() / 4) + 1; } void writeGCOVString(StringRef s) { |