[llvm-commits] CVS: llvm/include/llvm/Analysis/AliasAnalysis.h CallGraph.h Dominators.h FindUsedTypes.h LoopInfo.h PostDominators.h ValueNumbering.h

Reid Spencer reid at x10sys.com
Thu Jun 1 00:03:05 PDT 2006



Changes in directory llvm/include/llvm/Analysis:

AliasAnalysis.h updated: 1.23 -> 1.24
CallGraph.h updated: 1.46 -> 1.47
Dominators.h updated: 1.56 -> 1.57
FindUsedTypes.h updated: 1.26 -> 1.27
LoopInfo.h updated: 1.52 -> 1.53
PostDominators.h updated: 1.12 -> 1.13
ValueNumbering.h updated: 1.8 -> 1.9
---
Log message:

Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.


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

 AliasAnalysis.h  |    4 ++--
 CallGraph.h      |    4 ++--
 Dominators.h     |    4 ++--
 FindUsedTypes.h  |    4 ++--
 LoopInfo.h       |    4 ++--
 PostDominators.h |    4 ++--
 ValueNumbering.h |    4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)


Index: llvm/include/llvm/Analysis/AliasAnalysis.h
diff -u llvm/include/llvm/Analysis/AliasAnalysis.h:1.23 llvm/include/llvm/Analysis/AliasAnalysis.h:1.24
--- llvm/include/llvm/Analysis/AliasAnalysis.h:1.23	Wed Feb 22 10:23:42 2006
+++ llvm/include/llvm/Analysis/AliasAnalysis.h	Thu Jun  1 02:02:51 2006
@@ -321,8 +321,8 @@
 // the risk of AliasAnalysis being used, but the default implementation not
 // being linked into the tool that uses it.
 //
-extern void BasicAAStub();
-static IncludeFile HDR_INCLUDE_BASICAA_CPP((void*)&BasicAAStub);
+extern int BasicAAStub;
+static IncludeFile HDR_INCLUDE_BASICAA_CPP(&BasicAAStub);
 
 } // End llvm namespace
 


Index: llvm/include/llvm/Analysis/CallGraph.h
diff -u llvm/include/llvm/Analysis/CallGraph.h:1.46 llvm/include/llvm/Analysis/CallGraph.h:1.47
--- llvm/include/llvm/Analysis/CallGraph.h:1.46	Sat Jan 14 14:01:50 2006
+++ llvm/include/llvm/Analysis/CallGraph.h	Thu Jun  1 02:02:51 2006
@@ -155,7 +155,7 @@
   void dump() const;
   
   // stub - dummy function, just ignore it
-  static void stub();
+  static int stub;
 protected:
 
   // destroy - Release memory for the call graph
@@ -289,7 +289,7 @@
 
 // Make sure that any clients of this file link in CallGraph.cpp
 static IncludeFile
-CALLGRAPH_INCLUDE_FILE((void*)&CallGraph::stub);
+CALLGRAPH_INCLUDE_FILE(&CallGraph::stub);
 
 extern void BasicCallGraphStub();
 static IncludeFile HDR_INCLUDE_CALLGRAPH_CPP((void*)&BasicCallGraphStub);


Index: llvm/include/llvm/Analysis/Dominators.h
diff -u llvm/include/llvm/Analysis/Dominators.h:1.56 llvm/include/llvm/Analysis/Dominators.h:1.57
--- llvm/include/llvm/Analysis/Dominators.h:1.56	Sat May 27 01:57:55 2006
+++ llvm/include/llvm/Analysis/Dominators.h	Thu Jun  1 02:02:51 2006
@@ -276,7 +276,7 @@
   }
 
   // stub - dummy function, just ignore it
-  static void stub();
+  static int stub;
 };
 
 
@@ -654,7 +654,7 @@
 
 // Make sure that any clients of this file link in Dominators.cpp
 static IncludeFile
-DOMINATORS_INCLUDE_FILE((void*)&DominatorSet::stub);
+DOMINATORS_INCLUDE_FILE(&DominatorSet::stub);
 } // End llvm namespace
 
 #endif


Index: llvm/include/llvm/Analysis/FindUsedTypes.h
diff -u llvm/include/llvm/Analysis/FindUsedTypes.h:1.26 llvm/include/llvm/Analysis/FindUsedTypes.h:1.27
--- llvm/include/llvm/Analysis/FindUsedTypes.h:1.26	Sun May 15 12:25:14 2005
+++ llvm/include/llvm/Analysis/FindUsedTypes.h	Thu Jun  1 02:02:51 2006
@@ -55,12 +55,12 @@
   }
 
   // stub - dummy function, just ignore it
-  static void stub();
+  static int stub;
 };
 
 // Make sure that any clients of this file link in PostDominators.cpp
 static IncludeFile
-FIND_USED_TYPES_INCLUDE_FILE((void*)(&FindUsedTypes::stub));
+FIND_USED_TYPES_INCLUDE_FILE(&FindUsedTypes::stub);
 
 } // End llvm namespace
 


Index: llvm/include/llvm/Analysis/LoopInfo.h
diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.52 llvm/include/llvm/Analysis/LoopInfo.h:1.53
--- llvm/include/llvm/Analysis/LoopInfo.h:1.52	Sat Jan 14 14:55:08 2006
+++ llvm/include/llvm/Analysis/LoopInfo.h	Thu Jun  1 02:02:51 2006
@@ -295,7 +295,7 @@
   /// BasicBlocks to loops.
   void removeBlock(BasicBlock *BB);
 
-  static void stub();  // Noop
+  static int stub;  // Noop
 private:
   void Calculate(ETForest &EF);
   Loop *ConsiderForLoop(BasicBlock *BB, ETForest &EF);
@@ -306,7 +306,7 @@
 
 // Make sure that any clients of this file link in LoopInfo.cpp
 static IncludeFile
-LOOP_INFO_INCLUDE_FILE((void*)(&LoopInfo::stub));
+LOOP_INFO_INCLUDE_FILE(&LoopInfo::stub);
 
 // Allow clients to walk the list of nested loops...
 template <> struct GraphTraits<const Loop*> {


Index: llvm/include/llvm/Analysis/PostDominators.h
diff -u llvm/include/llvm/Analysis/PostDominators.h:1.12 llvm/include/llvm/Analysis/PostDominators.h:1.13
--- llvm/include/llvm/Analysis/PostDominators.h:1.12	Mon Mar 20 13:32:48 2006
+++ llvm/include/llvm/Analysis/PostDominators.h	Thu Jun  1 02:02:51 2006
@@ -129,7 +129,7 @@
   }
 
   // stub - dummy function, just ignore it
-  static void stub();
+  static int stub;
 
 private:
   const DomSetType &calculate(const PostDominatorTree &DT,
@@ -138,7 +138,7 @@
 
 // Make sure that any clients of this file link in PostDominators.cpp
 static IncludeFile
-POST_DOMINATOR_INCLUDE_FILE((void*)&PostDominanceFrontier::stub);
+POST_DOMINATOR_INCLUDE_FILE(&PostDominanceFrontier::stub);
 
 } // End llvm namespace
 


Index: llvm/include/llvm/Analysis/ValueNumbering.h
diff -u llvm/include/llvm/Analysis/ValueNumbering.h:1.8 llvm/include/llvm/Analysis/ValueNumbering.h:1.9
--- llvm/include/llvm/Analysis/ValueNumbering.h:1.8	Thu Apr 21 15:16:32 2005
+++ llvm/include/llvm/Analysis/ValueNumbering.h	Thu Jun  1 02:02:51 2006
@@ -65,9 +65,9 @@
   }
 };
 
-extern void BasicValueNumberingStub();
+extern int BasicValueNumberingStub;
 static IncludeFile
-HDR_INCLUDE_VALUENUMBERING_CPP((void*)&BasicValueNumberingStub);
+HDR_INCLUDE_VALUENUMBERING_CPP(&BasicValueNumberingStub);
 
 } // End llvm namespace
 






More information about the llvm-commits mailing list