commit | d363ff334d796c7f3df834d928a10d88ed758454 | [log] [tgz] |
---|---|---|
author | Nick Lewycky <nicholas@mxc.ca> | Thu May 05 23:52:18 2011 +0000 |
committer | Nick Lewycky <nicholas@mxc.ca> | Thu May 05 23:52:18 2011 +0000 |
tree | e8282cd50bfa122d426159bcb04320aeb02a0d0a | |
parent | 97a12165812e67782749bc18d22ba1edcaf11a6c [diff] [blame] |
The computation of string length is not that complicated. Fix it, again. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130967 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 23427f7..13eecb7 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -140,7 +140,7 @@ // 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) {