Mark a method 'const' and another 'static'.
authorCraig Topper <craig.topper@gmail.com>
Wed, 17 Jul 2013 03:54:53 +0000 (03:54 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 17 Jul 2013 03:54:53 +0000 (03:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186485 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/GCOVProfiling.cpp

index 3c6e0002fd1b34c960c971aaac0b84b4fd7a0c56..4c2681f0f362774c242a11ed09fb15c11365ea4e 100644 (file)
@@ -171,7 +171,7 @@ namespace {
 
     // Returns the length measured in 4-byte blocks that will be used to
     // represent this string in a GCOV file
-    unsigned lengthOfGCOVString(StringRef s) {
+    static unsigned lengthOfGCOVString(StringRef s) {
       // 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.
@@ -208,7 +208,7 @@ namespace {
       Lines.push_back(Line);
     }
 
-    uint32_t length() {
+    uint32_t length() const {
       // Here 2 = 1 for string length + 1 for '0' id#.
       return lengthOfGCOVString(Filename) + 2 + Lines.size();
     }