diff options
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/AliasAnalysis.h | 9 | ||||
-rw-r--r-- | include/llvm/Analysis/CallGraph.h | 10 | ||||
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 6 | ||||
-rw-r--r-- | include/llvm/Analysis/FindUsedTypes.h | 10 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 8 | ||||
-rw-r--r-- | include/llvm/Analysis/PostDominators.h | 10 | ||||
-rw-r--r-- | include/llvm/Analysis/ValueNumbering.h | 7 |
7 files changed, 22 insertions, 38 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index d715e08..2fff774 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -318,14 +318,13 @@ public: } }; +} // End llvm namespace + // Because of the way .a files work, we must force the BasicAA implementation to // be pulled in if the AliasAnalysis header is included. Otherwise we run // the risk of AliasAnalysis being used, but the default implementation not // being linked into the tool that uses it. -// -extern int BasicAAStub; -static IncludeFile HDR_INCLUDE_BASICAA_CPP(&BasicAAStub); - -} // End llvm namespace +FORCE_DEFINING_FILE_TO_BE_LINKED(AliasAnalysis) +FORCE_DEFINING_FILE_TO_BE_LINKED(BasicAliasAnalysis) #endif diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index e51a3c7..94cea10 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -287,13 +287,9 @@ template<> struct GraphTraits<const CallGraph*> : static nodes_iterator nodes_end (const CallGraph *CG) { return CG->end(); } }; -// Make sure that any clients of this file link in CallGraph.cpp -static IncludeFile -CALLGRAPH_INCLUDE_FILE(&CallGraph::stub); - -extern int BasicCallGraphStub; -static IncludeFile HDR_INCLUDE_CALLGRAPH_CPP(&BasicCallGraphStub); - } // End llvm namespace +// Make sure that any clients of this file link in CallGraph.cpp +FORCE_DEFINING_FILE_TO_BE_LINKED(CallGraph) + #endif diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 224e529..31b8562 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -652,9 +652,9 @@ private: }; -// Make sure that any clients of this file link in Dominators.cpp -static IncludeFile -DOMINATORS_INCLUDE_FILE(&DominatorSet::stub); } // End llvm namespace +// Make sure that any clients of this file link in Dominators.cpp +FORCE_DEFINING_FILE_TO_BE_LINKED(DominatorSet) + #endif diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index e16fe9d..fbf41de 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -53,15 +53,11 @@ public: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } - - // stub - dummy function, just ignore it - static int stub; }; -// Make sure that any clients of this file link in PostDominators.cpp -static IncludeFile -FIND_USED_TYPES_INCLUDE_FILE(&FindUsedTypes::stub); - } // End llvm namespace +// Make sure that any clients of this file link in PostDominators.cpp +FORCE_DEFINING_FILE_TO_BE_LINKED(FindUsedTypes) + #endif diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 065ce31..06b007c 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -295,7 +295,6 @@ public: /// BasicBlocks to loops. void removeBlock(BasicBlock *BB); - static int stub; // Noop private: void Calculate(ETForest &EF); Loop *ConsiderForLoop(BasicBlock *BB, ETForest &EF); @@ -304,10 +303,6 @@ private: }; -// Make sure that any clients of this file link in LoopInfo.cpp -static IncludeFile -LOOP_INFO_INCLUDE_FILE(&LoopInfo::stub); - // Allow clients to walk the list of nested loops... template <> struct GraphTraits<const Loop*> { typedef const Loop NodeType; @@ -337,4 +332,7 @@ template <> struct GraphTraits<Loop*> { } // End llvm namespace +// Make sure that any clients of this file link in LoopInfo.cpp +FORCE_DEFINING_FILE_TO_BE_LINKED(LoopInfo) + #endif diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index 1436be3..4d8d140 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -128,18 +128,14 @@ struct PostDominanceFrontier : public DominanceFrontierBase { AU.addRequired<PostDominatorTree>(); } - // stub - dummy function, just ignore it - static int stub; - private: const DomSetType &calculate(const PostDominatorTree &DT, const DominatorTree::Node *Node); }; -// Make sure that any clients of this file link in PostDominators.cpp -static IncludeFile -POST_DOMINATOR_INCLUDE_FILE(&PostDominanceFrontier::stub); - } // End llvm namespace +// Make sure that any clients of this file link in PostDominators.cpp +FORCE_DEFINING_FILE_TO_BE_LINKED(PostDominanceFrontier) + #endif diff --git a/include/llvm/Analysis/ValueNumbering.h b/include/llvm/Analysis/ValueNumbering.h index 2fc9497..f708f48 100644 --- a/include/llvm/Analysis/ValueNumbering.h +++ b/include/llvm/Analysis/ValueNumbering.h @@ -65,10 +65,9 @@ struct ValueNumbering { } }; -extern int BasicValueNumberingStub; -static IncludeFile -HDR_INCLUDE_VALUENUMBERING_CPP(&BasicValueNumberingStub); - } // End llvm namespace +// Force any file including this header to get the implementation as well +FORCE_DEFINING_FILE_TO_BE_LINKED(BasicValueNumbering) + #endif |