Changes in directory llvm/lib/Transforms/IPO:

InlineSimple.cpp updated: 1.82 -> 1.83
Inliner.cpp updated: 1.40 -> 1.41
Inliner.h updated: 1.12 -> 1.13
---
Log message:

Fix PR1395: http://llvm.org/PR1395 , by passing the ID correctly


---
Diffs of the changes:  (+4 -5)

 InlineSimple.cpp |    1 +
 Inliner.cpp      |    5 ++---
 Inliner.h        |    3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)


Index: llvm/lib/Transforms/IPO/InlineSimple.cpp
diff -u llvm/lib/Transforms/IPO/InlineSimple.cpp:1.82 
llvm/lib/Transforms/IPO/InlineSimple.cpp:1.83
--- llvm/lib/Transforms/IPO/InlineSimple.cpp:1.82       Sun May  6 08:37:16 2007
+++ llvm/lib/Transforms/IPO/InlineSimple.cpp    Sun May  6 18:13:56 2007
@@ -54,6 +54,7 @@
   class VISIBILITY_HIDDEN SimpleInliner : public Inliner {
     std::map<const Function*, FunctionInfo> CachedFunctionInfo;
   public:
+    SimpleInliner() : Inliner(&ID) {}
     static char ID; // Pass identification, replacement for typeid
     int getInlineCost(CallSite CS);
   };


Index: llvm/lib/Transforms/IPO/Inliner.cpp
diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.40 
llvm/lib/Transforms/IPO/Inliner.cpp:1.41
--- llvm/lib/Transforms/IPO/Inliner.cpp:1.40    Wed May  2 20:11:54 2007
+++ llvm/lib/Transforms/IPO/Inliner.cpp Sun May  6 18:13:56 2007
@@ -36,9 +36,8 @@
         cl::desc("Control the amount of inlining to perform (default = 200)"));
 }
 
-char Inliner::ID = 0;
-Inliner::Inliner() 
-  : CallGraphSCCPass((intptr_t)&ID), InlineThreshold(InlineLimit) {}
+Inliner::Inliner(const void *ID) 
+  : CallGraphSCCPass((intptr_t)ID), InlineThreshold(InlineLimit) {}
 
 /// getAnalysisUsage - For this class, we declare that we require and preserve
 /// the call graph.  If the derived class implements this method, it should


Index: llvm/lib/Transforms/IPO/Inliner.h
diff -u llvm/lib/Transforms/IPO/Inliner.h:1.12 
llvm/lib/Transforms/IPO/Inliner.h:1.13
--- llvm/lib/Transforms/IPO/Inliner.h:1.12      Wed May  2 20:11:54 2007
+++ llvm/lib/Transforms/IPO/Inliner.h   Sun May  6 18:13:56 2007
@@ -27,8 +27,7 @@
 /// perform the inlining operations that does not depend on the policy.
 ///
 struct Inliner : public CallGraphSCCPass {
-  static char ID;
-  Inliner();
+  Inliner(const void *ID);
 
   /// getAnalysisUsage - For this class, we declare that we require and 
preserve
   /// the call graph.  If the derived class implements this method, it should



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to