[llvm-commits] CVS: llvm/lib/Analysis/IPA/CallGraph.cpp FindUsedTypes.cpp

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



Changes in directory llvm/lib/Analysis/IPA:

CallGraph.cpp updated: 1.51 -> 1.52
FindUsedTypes.cpp updated: 1.34 -> 1.35
---
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:  (+2 -2)

 CallGraph.cpp     |    2 +-
 FindUsedTypes.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Analysis/IPA/CallGraph.cpp
diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.51 llvm/lib/Analysis/IPA/CallGraph.cpp:1.52
--- llvm/lib/Analysis/IPA/CallGraph.cpp:1.51	Sat Jan 14 14:03:00 2006
+++ llvm/lib/Analysis/IPA/CallGraph.cpp	Thu Jun  1 02:02:51 2006
@@ -258,7 +258,7 @@
 
 
 
-void CallGraph::stub() {}
+int CallGraph::stub; // to ensure linkage of this file.
 
 void CallGraphNode::print(std::ostream &OS) const {
   if (Function *F = getFunction())


Index: llvm/lib/Analysis/IPA/FindUsedTypes.cpp
diff -u llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.34 llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.35
--- llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.34	Mon Jan  9 21:48:34 2006
+++ llvm/lib/Analysis/IPA/FindUsedTypes.cpp	Thu Jun  1 02:02:51 2006
@@ -25,7 +25,7 @@
 X("printusedtypes", "Find Used Types");
 
 // stub to help linkage
-void FindUsedTypes::stub() {}
+int FindUsedTypes::stub; // to ensure linkage of this file
 
 // IncorporateType - Incorporate one type and all of its subtypes into the
 // collection of used types.






More information about the llvm-commits mailing list