Make a few more static string pointers constant.
authorCraig Topper <craig.topper@gmail.com>
Wed, 17 Jul 2013 03:43:10 +0000 (03:43 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 17 Jul 2013 03:43:10 +0000 (03:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186484 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/GCOVProfiling.cpp

index 408c61a4a28ecf4e952f5842553a2aa75653e086..3c6e0002fd1b34c960c971aaac0b84b4fd7a0c56 100644 (file)
@@ -154,10 +154,10 @@ static std::string getFunctionName(DISubprogram SP) {
 namespace {
   class GCOVRecord {
    protected:
-    static const char *LinesTag;
-    static const char *FunctionTag;
-    static const char *BlockTag;
-    static const char *EdgeTag;
+    static const char *const LinesTag;
+    static const char *const FunctionTag;
+    static const char *const BlockTag;
+    static const char *const EdgeTag;
 
     GCOVRecord() {}
 
@@ -191,10 +191,10 @@ namespace {
 
     raw_ostream *os;
   };
-  const char *GCOVRecord::LinesTag = "\0\0\x45\x01";
-  const char *GCOVRecord::FunctionTag = "\0\0\0\1";
-  const char *GCOVRecord::BlockTag = "\0\0\x41\x01";
-  const char *GCOVRecord::EdgeTag = "\0\0\x43\x01";
+  const char *const GCOVRecord::LinesTag = "\0\0\x45\x01";
+  const char *const GCOVRecord::FunctionTag = "\0\0\0\1";
+  const char *const GCOVRecord::BlockTag = "\0\0\x41\x01";
+  const char *const GCOVRecord::EdgeTag = "\0\0\x43\x01";
 
   class GCOVFunction;
   class GCOVBlock;