[llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp EdgeProfiling.cpp RSProfiling.cpp RSProfiling.h

Devang Patel dpatel at apple.com
Wed May 2 18:13:55 PDT 2007



Changes in directory llvm/lib/Transforms/Instrumentation:

BlockProfiling.cpp updated: 1.24 -> 1.25
EdgeProfiling.cpp updated: 1.14 -> 1.15
RSProfiling.cpp updated: 1.26 -> 1.27
RSProfiling.h updated: 1.6 -> 1.7
---
Log message:

Drop 'const'


---
Diffs of the changes:  (+12 -12)

 BlockProfiling.cpp |    8 ++++----
 EdgeProfiling.cpp  |    4 ++--
 RSProfiling.cpp    |   10 +++++-----
 RSProfiling.h      |    2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)


Index: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.24 llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.25
--- llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.24	Wed May  2 16:39:19 2007
+++ llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp	Wed May  2 20:11:54 2007
@@ -33,11 +33,11 @@
 namespace {
   class VISIBILITY_HIDDEN FunctionProfiler : public RSProfilers_std {
   public:
-    static const char ID;
+    static char ID;
     bool runOnModule(Module &M);
   };
 
-  const char FunctionProfiler::ID = 0;
+  char FunctionProfiler::ID = 0;
 
   RegisterPass<FunctionProfiler> X("insert-function-profiling",
                                "Insert instrumentation for function profiling");
@@ -84,10 +84,10 @@
   class BlockProfiler : public RSProfilers_std {
     bool runOnModule(Module &M);
   public:
-    static const char ID;
+    static char ID;
   };
 
-  const char BlockProfiler::ID = 0;
+  char BlockProfiler::ID = 0;
   RegisterPass<BlockProfiler> Y("insert-block-profiling",
                                 "Insert instrumentation for block profiling");
   RegisterAnalysisGroup<RSProfilers> YG(Y);


Index: llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.14 llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.15
--- llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp:1.14	Wed May  2 16:39:19 2007
+++ llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp	Wed May  2 20:11:54 2007
@@ -33,11 +33,11 @@
   class VISIBILITY_HIDDEN EdgeProfiler : public ModulePass {
     bool runOnModule(Module &M);
   public:
-    static const char ID; // Pass identifcation, replacement for typeid
+    static char ID; // Pass identifcation, replacement for typeid
     EdgeProfiler() : ModulePass((intptr_t)&ID) {}
   };
 
-  const char EdgeProfiler::ID = 0;
+  char EdgeProfiler::ID = 0;
   RegisterPass<EdgeProfiler> X("insert-edge-profiling",
                                "Insert instrumentation for edge profiling");
 }


Index: llvm/lib/Transforms/Instrumentation/RSProfiling.cpp
diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.26 llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.27
--- llvm/lib/Transforms/Instrumentation/RSProfiling.cpp:1.26	Wed May  2 16:39:19 2007
+++ llvm/lib/Transforms/Instrumentation/RSProfiling.cpp	Wed May  2 20:11:54 2007
@@ -69,7 +69,7 @@
   /// measuring framework overhead
   class VISIBILITY_HIDDEN NullProfilerRS : public RSProfilers {
   public:
-    static const char ID; // Pass identifcation, replacement for typeid
+    static char ID; // Pass identifcation, replacement for typeid
     bool isProfiling(Value* v) {
       return false;
     }
@@ -139,7 +139,7 @@
 
   /// ProfilerRS - Insert the random sampling framework
   struct VISIBILITY_HIDDEN ProfilerRS : public FunctionPass {
-    static const char ID; // Pass identifcation, replacement for typeid
+    static char ID; // Pass identifcation, replacement for typeid
     ProfilerRS() : FunctionPass((intptr_t)&ID) {}
 
     std::map<Value*, Value*> TransCache;
@@ -162,9 +162,9 @@
                              "Insert random sampling instrumentation framework");
 }
 
-const char RSProfilers::ID = 0;
-const char NullProfilerRS::ID = 0;
-const char ProfilerRS::ID = 0;
+char RSProfilers::ID = 0;
+char NullProfilerRS::ID = 0;
+char ProfilerRS::ID = 0;
 
 //Local utilities
 static void ReplacePhiPred(BasicBlock* btarget, 


Index: llvm/lib/Transforms/Instrumentation/RSProfiling.h
diff -u llvm/lib/Transforms/Instrumentation/RSProfiling.h:1.6 llvm/lib/Transforms/Instrumentation/RSProfiling.h:1.7
--- llvm/lib/Transforms/Instrumentation/RSProfiling.h:1.6	Wed May  2 16:39:19 2007
+++ llvm/lib/Transforms/Instrumentation/RSProfiling.h	Wed May  2 20:11:54 2007
@@ -17,7 +17,7 @@
   /// RSProfilers_std - a simple support class for profilers that handles most
   /// of the work of chaining and tracking inserted code.
   struct RSProfilers_std : public RSProfilers {
-    static const char ID;
+    static char ID;
     std::set<Value*> profcode;
     // Lookup up values in profcode
     virtual bool isProfiling(Value* v);






More information about the llvm-commits mailing list