diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 88449ab2580..3fe03b5e74c 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -55,6 +55,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Pass.h" #include "llvm/Support/CallSite.h" +#include "llvm/System/IncludeFile.h" #include namespace llvm { @@ -158,10 +159,7 @@ public: void print(std::ostream *o, const Module *M) const { if (o) print(*o, M); } void dump() const; - // stub - dummy function, just ignore it - static int stub; protected: - // destroy - Release memory for the call graph virtual void destroy(); }; diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index b0d38c509c1..d3e62e26965 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -61,7 +61,4 @@ public: } // 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 c2b1ac6e107..28748b0e541 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -1013,7 +1013,4 @@ void LoopBase::addBasicBlockToLoop(BlockT *NewBB, } // 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 27c2b26c8c2..51b3e807d8b 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -92,7 +92,4 @@ private: } // 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 3d7130d3f45..72452acda15 100644 --- a/include/llvm/Analysis/ValueNumbering.h +++ b/include/llvm/Analysis/ValueNumbering.h @@ -22,6 +22,7 @@ #include #include "llvm/Pass.h" +#include "llvm/System/IncludeFile.h" namespace llvm { diff --git a/include/llvm/CodeGen/MachineLoopInfo.h b/include/llvm/CodeGen/MachineLoopInfo.h index 20f32c3e67f..8b46825f257 100644 --- a/include/llvm/CodeGen/MachineLoopInfo.h +++ b/include/llvm/CodeGen/MachineLoopInfo.h @@ -187,7 +187,4 @@ template <> struct GraphTraits { } // End llvm namespace -// Make sure that any clients of this file link in LoopInfo.cpp -FORCE_DEFINING_FILE_TO_BE_LINKED(MachineLoopInfo) - #endif diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index 5823a23b1c9..d3a53168f19 100644 --- a/include/llvm/IntrinsicInst.h +++ b/include/llvm/IntrinsicInst.h @@ -28,7 +28,6 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" -#include "llvm/System/IncludeFile.h" namespace llvm { /// IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic @@ -316,8 +315,4 @@ namespace llvm { } -// Ensure that the IntrinsicInst.cpp file gets added as a dependency of any -// file that includes this header -FORCE_DEFINING_FILE_TO_BE_LINKED(IntrinsicInst) - #endif diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h index 68fd901048f..29e73748153 100644 --- a/include/llvm/PassSupport.h +++ b/include/llvm/PassSupport.h @@ -21,7 +21,6 @@ #ifndef LLVM_PASS_SUPPORT_H #define LLVM_PASS_SUPPORT_H -#include "llvm/System/IncludeFile.h" // No need to include Pass.h, we are being included by it! namespace llvm { diff --git a/include/llvm/Support/Dwarf.h b/include/llvm/Support/Dwarf.h index 79f30e9fa7b..01bfc3f3537 100644 --- a/include/llvm/Support/Dwarf.h +++ b/include/llvm/Support/Dwarf.h @@ -16,8 +16,6 @@ #ifndef LLVM_SUPPORT_DWARF_H #define LLVM_SUPPORT_DWARF_H -#include "llvm/System/IncludeFile.h" - namespace llvm { namespace dwarf { @@ -567,6 +565,4 @@ const char *CallFrameString(unsigned Encoding); } // End of namespace llvm -FORCE_DEFINING_FILE_TO_BE_LINKED(SupportDwarf) - #endif diff --git a/include/llvm/Support/Mangler.h b/include/llvm/Support/Mangler.h index 87b4ae69b10..39ac26dd1bf 100644 --- a/include/llvm/Support/Mangler.h +++ b/include/llvm/Support/Mangler.h @@ -14,7 +14,6 @@ #ifndef LLVM_SUPPORT_MANGLER_H #define LLVM_SUPPORT_MANGLER_H -#include "llvm/System/IncludeFile.h" #include #include #include @@ -112,7 +111,4 @@ private: } // End llvm namespace -// Force the Mangler.cpp file to be linked when this header is #included -FORCE_DEFINING_FILE_TO_BE_LINKED(Mangler) - #endif // LLVM_SUPPORT_MANGLER_H diff --git a/include/llvm/System/Alarm.h b/include/llvm/System/Alarm.h index 708472ceee3..718ab8f3bb1 100644 --- a/include/llvm/System/Alarm.h +++ b/include/llvm/System/Alarm.h @@ -17,8 +17,6 @@ #ifndef LLVM_SYSTEM_ALARM_H #define LLVM_SYSTEM_ALARM_H -#include "llvm/System/IncludeFile.h" - namespace llvm { namespace sys { @@ -44,6 +42,4 @@ namespace sys { } // End sys namespace } // End llvm namespace -FORCE_DEFINING_FILE_TO_BE_LINKED(SystemAlarm) - #endif diff --git a/include/llvm/System/DynamicLibrary.h b/include/llvm/System/DynamicLibrary.h index e1c6a40f1cd..409a9d279c2 100644 --- a/include/llvm/System/DynamicLibrary.h +++ b/include/llvm/System/DynamicLibrary.h @@ -15,7 +15,6 @@ #define LLVM_SYSTEM_DYNAMIC_LIBRARY_H #include "llvm/System/Path.h" -#include "llvm/System/IncludeFile.h" #include namespace llvm { @@ -96,6 +95,4 @@ namespace sys { } // End sys namespace } // End llvm namespace -FORCE_DEFINING_FILE_TO_BE_LINKED(SystemDynamicLibrary) - #endif // LLVM_SYSTEM_DYNAMIC_LIBRARY_H diff --git a/include/llvm/System/Memory.h b/include/llvm/System/Memory.h index b4ebf0e87f8..52e1f3f14b7 100644 --- a/include/llvm/System/Memory.h +++ b/include/llvm/System/Memory.h @@ -15,7 +15,6 @@ #define LLVM_SYSTEM_MEMORY_H #include -#include "llvm/System/IncludeFile.h" namespace llvm { namespace sys { @@ -71,6 +70,4 @@ namespace sys { } } -FORCE_DEFINING_FILE_TO_BE_LINKED(SystemMemory) - #endif diff --git a/include/llvm/System/Process.h b/include/llvm/System/Process.h index 2f78e214552..f98a3612c6c 100644 --- a/include/llvm/System/Process.h +++ b/include/llvm/System/Process.h @@ -15,7 +15,6 @@ #define LLVM_SYSTEM_PROCESS_H #include "llvm/System/TimeValue.h" -#include "llvm/System/IncludeFile.h" namespace llvm { namespace sys { @@ -100,6 +99,4 @@ namespace sys { } } -FORCE_DEFINING_FILE_TO_BE_LINKED(SystemProcess) - #endif diff --git a/include/llvm/System/Program.h b/include/llvm/System/Program.h index 69e38321a1b..3e9a1f2835e 100644 --- a/include/llvm/System/Program.h +++ b/include/llvm/System/Program.h @@ -15,7 +15,6 @@ #define LLVM_SYSTEM_PROGRAM_H #include "llvm/System/Path.h" -#include "llvm/System/IncludeFile.h" #include namespace llvm { @@ -90,6 +89,4 @@ namespace sys { } } -FORCE_DEFINING_FILE_TO_BE_LINKED(SystemProgram) - #endif diff --git a/include/llvm/System/Signals.h b/include/llvm/System/Signals.h index 416a4c8f9da..197e4e1d2d6 100644 --- a/include/llvm/System/Signals.h +++ b/include/llvm/System/Signals.h @@ -16,7 +16,6 @@ #define LLVM_SYSTEM_SIGNALS_H #include "llvm/System/Path.h" -#include "llvm/System/IncludeFile.h" namespace llvm { namespace sys { @@ -50,6 +49,4 @@ namespace sys { } // End sys namespace } // End llvm namespace -FORCE_DEFINING_FILE_TO_BE_LINKED(SystemSignals) - #endif diff --git a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h index 8e2bc0eb965..598adfc0bce 100644 --- a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h +++ b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h @@ -40,16 +40,10 @@ public: BasicBlock *getUnreachableBlock() const { return UnreachableBlock; } virtual bool runOnFunction(Function &F); - - // Force linking the impl of this class into anything that uses this header. - static int stub; }; Pass *createUnifyFunctionExitNodesPass(); -static IncludeFile -UNIFY_FUNCTION_EXIT_NODES_INCLUDE_FILE(&UnifyFunctionExitNodes::stub); - } // End llvm namespace #endif diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp index cd61842f7c2..0a28cd5153c 100644 --- a/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/lib/Analysis/IPA/FindUsedTypes.cpp @@ -96,6 +96,3 @@ void FindUsedTypes::print(std::ostream &o, const Module *M) const { E = UsedTypes.end(); I != E; ++I) WriteTypeSymbolic(o << " ", *I, M) << "\n"; } - -// Ensure that this file gets linked in when FindUsedTypes.h is used. -DEFINING_FILE_FOR(FindUsedTypes) diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index e067c1768fe..b6c6c5ffc0b 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -51,6 +51,3 @@ void LoopInfo::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired(); } - -// Ensure this file gets linked when LoopInfo.h is used. -DEFINING_FILE_FOR(LoopInfo) diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp index c72b140a622..cfa1b463295 100644 --- a/lib/Analysis/PostDominators.cpp +++ b/lib/Analysis/PostDominators.cpp @@ -84,6 +84,3 @@ PostDominanceFrontier::calculate(const PostDominatorTree &DT, return S; } - -// Ensure that this .cpp file gets linked when PostDominators.h is used. -DEFINING_FILE_FOR(PostDominanceFrontier) diff --git a/lib/CodeGen/MachineLoopInfo.cpp b/lib/CodeGen/MachineLoopInfo.cpp index 9900728d3e9..007317ccb59 100644 --- a/lib/CodeGen/MachineLoopInfo.cpp +++ b/lib/CodeGen/MachineLoopInfo.cpp @@ -40,6 +40,3 @@ void MachineLoopInfo::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired(); } - -// Ensure this file gets linked when MachineLoopInfo.h is used. -DEFINING_FILE_FOR(MachineLoopInfo) diff --git a/lib/Support/Dwarf.cpp b/lib/Support/Dwarf.cpp index 53d0ecbcbed..f3f183436ec 100644 --- a/lib/Support/Dwarf.cpp +++ b/lib/Support/Dwarf.cpp @@ -12,7 +12,6 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/Dwarf.h" -#include "llvm/System/IncludeFile.h" #include @@ -582,5 +581,3 @@ const char *CallFrameString(unsigned Encoding) { } // End of namespace dwarf. } // End of namespace llvm. - -DEFINING_FILE_FOR(SupportDwarf) diff --git a/lib/System/Alarm.cpp b/lib/System/Alarm.cpp index 57a8b081856..0014ca716b3 100644 --- a/lib/System/Alarm.cpp +++ b/lib/System/Alarm.cpp @@ -31,5 +31,3 @@ using namespace sys; #ifdef LLVM_ON_WIN32 #include "Win32/Alarm.inc" #endif - -DEFINING_FILE_FOR(SystemAlarm) diff --git a/lib/System/DynamicLibrary.cpp b/lib/System/DynamicLibrary.cpp index 7af718d490d..572ba496e19 100644 --- a/lib/System/DynamicLibrary.cpp +++ b/lib/System/DynamicLibrary.cpp @@ -159,5 +159,3 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) { } #endif // LLVM_ON_WIN32 - -DEFINING_FILE_FOR(SystemDynamicLibrary) diff --git a/lib/System/Memory.cpp b/lib/System/Memory.cpp index a0aa5432688..054cc966a3e 100644 --- a/lib/System/Memory.cpp +++ b/lib/System/Memory.cpp @@ -14,7 +14,6 @@ #include "llvm/System/Memory.h" #include "llvm/Config/config.h" -#include "llvm/System/IncludeFile.h" namespace llvm { using namespace sys; @@ -33,5 +32,3 @@ using namespace sys; #ifdef LLVM_ON_WIN32 #include "Win32/Memory.inc" #endif - -DEFINING_FILE_FOR(SystemMemory) diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp index 0b7c5b57459..3bef7ce0b02 100644 --- a/lib/System/Mutex.cpp +++ b/lib/System/Mutex.cpp @@ -13,7 +13,6 @@ #include "llvm/Config/config.h" #include "llvm/System/Mutex.h" -#include "llvm/System/IncludeFile.h" //===----------------------------------------------------------------------===// //=== WARNING: Implementation here must contain only TRULY operating system diff --git a/lib/System/Process.cpp b/lib/System/Process.cpp index 4a5f9bafdd7..e93b2af4c12 100644 --- a/lib/System/Process.cpp +++ b/lib/System/Process.cpp @@ -31,5 +31,3 @@ using namespace sys; #ifdef LLVM_ON_WIN32 #include "Win32/Process.inc" #endif - -DEFINING_FILE_FOR(SystemProcess) diff --git a/lib/System/Program.cpp b/lib/System/Program.cpp index fb00dc958fb..eb289d81b2e 100644 --- a/lib/System/Program.cpp +++ b/lib/System/Program.cpp @@ -31,5 +31,3 @@ using namespace sys; #ifdef LLVM_ON_WIN32 #include "Win32/Program.inc" #endif - -DEFINING_FILE_FOR(SystemProgram) diff --git a/lib/System/Signals.cpp b/lib/System/Signals.cpp index fddb85410d4..d345b0a9aed 100644 --- a/lib/System/Signals.cpp +++ b/lib/System/Signals.cpp @@ -32,5 +32,3 @@ using namespace sys; #ifdef LLVM_ON_WIN32 #include "Win32/Signals.inc" #endif - -DEFINING_FILE_FOR(SystemSignals) diff --git a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index 6cdaba53a05..c024d32374e 100644 --- a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -28,8 +28,6 @@ char UnifyFunctionExitNodes::ID = 0; static RegisterPass X("mergereturn", "Unify function exit nodes"); -int UnifyFunctionExitNodes::stub; - Pass *llvm::createUnifyFunctionExitNodesPass() { return new UnifyFunctionExitNodes(); } diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp index fb7a74b5f77..94f582911e1 100644 --- a/lib/VMCore/IntrinsicInst.cpp +++ b/lib/VMCore/IntrinsicInst.cpp @@ -74,7 +74,3 @@ std::string DbgStopPointInst::getDirectory() const { ConstantStruct *CS = cast(GV->getInitializer()); return CS->getOperand(4)->getStringValue(); } - -//===----------------------------------------------------------------------===// -/// Ensure that users of IntrinsicInst.h will link with this module. -DEFINING_FILE_FOR(IntrinsicInst) diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 7448e7de444..0437508f394 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -211,6 +211,3 @@ Mangler::Mangler(Module &M, const char *prefix) for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) InsertName(I, Names); } - -// Cause this file to be linked in when Support/Mangler.h is #included -DEFINING_FILE_FOR(Mangler)