diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-06-01 07:02:51 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-06-01 07:02:51 +0000 |
commit | 192913e281a0e9b97275fa1b84da96b02397323e (patch) | |
tree | d3d93efb3824a5c7fe9e186b86da2fe322f02512 /include/llvm/Analysis | |
parent | 177284ce8976d840e6093c6555dacc13f3ed0c4f (diff) | |
download | llvm-192913e281a0e9b97275fa1b84da96b02397323e.tar.gz llvm-192913e281a0e9b97275fa1b84da96b02397323e.tar.bz2 llvm-192913e281a0e9b97275fa1b84da96b02397323e.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/AliasAnalysis.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/CallGraph.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/FindUsedTypes.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/PostDominators.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/ValueNumbering.h | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index 1cce4ea393..0de7a7fd86 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -321,8 +321,8 @@ public: // 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 diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 734306015c..5602cec26e 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -155,7 +155,7 @@ public: 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 @@ template<> struct GraphTraits<const CallGraph*> : // 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); diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index d73b407d21..224e529915 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -276,7 +276,7 @@ public: } // stub - dummy function, just ignore it - static void stub(); + static int stub; }; @@ -654,7 +654,7 @@ private: // 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 diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index 92f3677502..e16fe9d7c3 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -55,12 +55,12 @@ public: } // 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 diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 425c33f418..065ce31d8b 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -295,7 +295,7 @@ public: /// 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 @@ private: // 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*> { diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index b9a1feb8ba..1436be3037 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -129,7 +129,7 @@ struct PostDominanceFrontier : public DominanceFrontierBase { } // stub - dummy function, just ignore it - static void stub(); + static int stub; private: const DomSetType &calculate(const PostDominatorTree &DT, @@ -138,7 +138,7 @@ private: // 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 diff --git a/include/llvm/Analysis/ValueNumbering.h b/include/llvm/Analysis/ValueNumbering.h index 6169955d94..2fc949766e 100644 --- a/include/llvm/Analysis/ValueNumbering.h +++ b/include/llvm/Analysis/ValueNumbering.h @@ -65,9 +65,9 @@ struct ValueNumbering { } }; -extern void BasicValueNumberingStub(); +extern int BasicValueNumberingStub; static IncludeFile -HDR_INCLUDE_VALUENUMBERING_CPP((void*)&BasicValueNumberingStub); +HDR_INCLUDE_VALUENUMBERING_CPP(&BasicValueNumberingStub); } // End llvm namespace |