mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[PM] Appease mingw32's auto-import DLL build with minimal tweaks, with fix for clang.
char AnalysisBase::ID should be declared as extern and defined in one module. llvm-svn: 262188
This commit is contained in:
parent
3fa50b2630
commit
798b80e69c
@ -1024,6 +1024,8 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<AAManager>;
|
||||
|
||||
/// A wrapper pass to provide the legacy pass manager access to a suitably
|
||||
/// prepared AAResults object.
|
||||
class AAResultsWrapperPass : public FunctionPass {
|
||||
|
@ -105,6 +105,8 @@ struct AssumptionAnalysis : AnalysisBase<AssumptionAnalysis> {
|
||||
AssumptionCache run(Function &F) { return AssumptionCache(F); }
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<AssumptionAnalysis>;
|
||||
|
||||
/// \brief Printer pass for the \c AssumptionAnalysis results.
|
||||
class AssumptionPrinterPass : public PassBase<AssumptionPrinterPass> {
|
||||
raw_ostream &OS;
|
||||
|
@ -48,12 +48,16 @@ extern template class InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>;
|
||||
typedef InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>
|
||||
CGSCCAnalysisManagerModuleProxy;
|
||||
|
||||
extern template class AnalysisBase<CGSCCAnalysisManagerModuleProxy>;
|
||||
|
||||
extern template class OuterAnalysisManagerProxy<ModuleAnalysisManager,
|
||||
LazyCallGraph::SCC>;
|
||||
/// A proxy from a \c ModuleAnalysisManager to an \c SCC.
|
||||
typedef OuterAnalysisManagerProxy<ModuleAnalysisManager, LazyCallGraph::SCC>
|
||||
ModuleAnalysisManagerCGSCCProxy;
|
||||
|
||||
extern template class AnalysisBase<ModuleAnalysisManagerCGSCCProxy>;
|
||||
|
||||
/// \brief The core module pass which does a post-order walk of the SCCs and
|
||||
/// runs a CGSCC pass over each one.
|
||||
///
|
||||
@ -144,6 +148,8 @@ extern template class InnerAnalysisManagerProxy<FunctionAnalysisManager,
|
||||
typedef InnerAnalysisManagerProxy<FunctionAnalysisManager, LazyCallGraph::SCC>
|
||||
FunctionAnalysisManagerCGSCCProxy;
|
||||
|
||||
extern template class AnalysisBase<FunctionAnalysisManagerCGSCCProxy>;
|
||||
|
||||
extern template class OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>;
|
||||
/// A proxy from a \c CGSCCAnalysisManager to a \c Function.
|
||||
typedef OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>
|
||||
|
@ -176,6 +176,8 @@ struct DominanceFrontierAnalysis : AnalysisBase<DominanceFrontierAnalysis> {
|
||||
DominanceFrontier run(Function &F, AnalysisManager<Function> *AM);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<DominanceFrontierAnalysis>;
|
||||
|
||||
/// \brief Printer pass for the \c DominanceFrontier.
|
||||
class DominanceFrontierPrinterPass
|
||||
: public PassBase<DominanceFrontierPrinterPass> {
|
||||
|
@ -906,6 +906,8 @@ struct LazyCallGraphAnalysis : AnalysisBase<LazyCallGraphAnalysis> {
|
||||
LazyCallGraph run(Module &M) { return LazyCallGraph(M); }
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<LazyCallGraphAnalysis>;
|
||||
|
||||
/// A pass which prints the call graph to a \c raw_ostream.
|
||||
///
|
||||
/// This is primarily useful for testing the analysis.
|
||||
|
@ -793,6 +793,8 @@ struct LoopAnalysis : AnalysisBase<LoopAnalysis> {
|
||||
LoopInfo run(Function &F, AnalysisManager<Function> *AM);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<LoopAnalysis>;
|
||||
|
||||
/// \brief Printer pass for the \c LoopAnalysis results.
|
||||
class LoopPrinterPass : public PassBase<LoopPrinterPass> {
|
||||
raw_ostream &OS;
|
||||
|
@ -43,6 +43,8 @@ extern template class InnerAnalysisManagerProxy<LoopAnalysisManager, Function>;
|
||||
typedef InnerAnalysisManagerProxy<LoopAnalysisManager, Function>
|
||||
LoopAnalysisManagerFunctionProxy;
|
||||
|
||||
extern template class AnalysisBase<LoopAnalysisManagerFunctionProxy>;
|
||||
|
||||
extern template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop>;
|
||||
/// A proxy from a \c FunctionAnalysisManager to a \c Loop.
|
||||
typedef OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop>
|
||||
|
@ -46,6 +46,8 @@ struct PostDominatorTreeAnalysis : AnalysisBase<PostDominatorTreeAnalysis> {
|
||||
PostDominatorTree run(Function &F);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<PostDominatorTreeAnalysis>;
|
||||
|
||||
/// \brief Printer pass for the \c PostDominatorTree.
|
||||
class PostDominatorTreePrinterPass
|
||||
: public PassBase<PostDominatorTreePrinterPass> {
|
||||
|
@ -929,6 +929,8 @@ struct RegionInfoAnalysis : AnalysisBase<RegionInfoAnalysis> {
|
||||
RegionInfo run(Function &F, AnalysisManager<Function> *AM);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<RegionInfoAnalysis>;
|
||||
|
||||
/// \brief Printer pass for the \c RegionInfo.
|
||||
class RegionInfoPrinterPass : public PassBase<RegionInfoPrinterPass> {
|
||||
raw_ostream &OS;
|
||||
|
@ -1421,6 +1421,8 @@ namespace llvm {
|
||||
ScalarEvolution run(Function &F, AnalysisManager<Function> *AM);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<ScalarEvolutionAnalysis>;
|
||||
|
||||
/// \brief Printer pass for the \c ScalarEvolutionAnalysis results.
|
||||
class ScalarEvolutionPrinterPass
|
||||
: public PassBase<ScalarEvolutionPrinterPass> {
|
||||
|
@ -299,6 +299,8 @@ private:
|
||||
TargetLibraryInfoImpl &lookupInfoImpl(Triple T);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<TargetLibraryAnalysis>;
|
||||
|
||||
class TargetLibraryInfoWrapperPass : public ImmutablePass {
|
||||
TargetLibraryInfoImpl TLIImpl;
|
||||
TargetLibraryInfo TLI;
|
||||
|
@ -938,6 +938,8 @@ private:
|
||||
static Result getDefaultTTI(const Function &F);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<TargetIRAnalysis>;
|
||||
|
||||
/// \brief Wrapper pass for TargetTransformInfo.
|
||||
///
|
||||
/// This pass can be constructed from a TTI object which it stores internally
|
||||
|
@ -190,6 +190,8 @@ struct DominatorTreeAnalysis : AnalysisBase<DominatorTreeAnalysis> {
|
||||
DominatorTree run(Function &F);
|
||||
};
|
||||
|
||||
extern template class AnalysisBase<DominatorTreeAnalysis>;
|
||||
|
||||
/// \brief Printer pass for the \c DominatorTree.
|
||||
class DominatorTreePrinterPass : public PassBase<DominatorTreePrinterPass> {
|
||||
raw_ostream &OS;
|
||||
|
@ -749,6 +749,8 @@ extern template class InnerAnalysisManagerProxy<FunctionAnalysisManager,
|
||||
typedef InnerAnalysisManagerProxy<FunctionAnalysisManager, Module>
|
||||
FunctionAnalysisManagerModuleProxy;
|
||||
|
||||
extern template class AnalysisBase<FunctionAnalysisManagerModuleProxy>;
|
||||
|
||||
/// \brief A function analysis which acts as a proxy for a module analysis
|
||||
/// manager.
|
||||
///
|
||||
|
@ -390,6 +390,9 @@ bool AAResults::canInstructionRangeModRef(const Instruction &I1,
|
||||
// Provide a definition for the root virtual destructor.
|
||||
AAResults::Concept::~Concept() {}
|
||||
|
||||
// Provide a definition for the static object used to identify passes.
|
||||
template class llvm::AnalysisBase<AAManager>;
|
||||
|
||||
namespace {
|
||||
/// A wrapper pass for external alias analyses. This just squirrels away the
|
||||
/// callback used to run any analyses and register their results.
|
||||
|
@ -74,6 +74,8 @@ void AssumptionCache::registerAssumption(CallInst *CI) {
|
||||
#endif
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<AssumptionAnalysis>;
|
||||
|
||||
PreservedAnalyses AssumptionPrinterPass::run(Function &F,
|
||||
AnalysisManager<Function> *AM) {
|
||||
AssumptionCache &AC = AM->getResult<AssumptionAnalysis>(F);
|
||||
|
@ -18,9 +18,12 @@ namespace llvm {
|
||||
template class PassManager<LazyCallGraph::SCC>;
|
||||
template class AnalysisManager<LazyCallGraph::SCC>;
|
||||
template class InnerAnalysisManagerProxy<CGSCCAnalysisManager, Module>;
|
||||
template class AnalysisBase<CGSCCAnalysisManagerModuleProxy>;
|
||||
template class OuterAnalysisManagerProxy<ModuleAnalysisManager,
|
||||
LazyCallGraph::SCC>;
|
||||
template class AnalysisBase<ModuleAnalysisManagerCGSCCProxy>;
|
||||
template class InnerAnalysisManagerProxy<FunctionAnalysisManager,
|
||||
LazyCallGraph::SCC>;
|
||||
template class AnalysisBase<FunctionAnalysisManagerCGSCCProxy>;
|
||||
template class OuterAnalysisManagerProxy<CGSCCAnalysisManager, Function>;
|
||||
}
|
||||
|
@ -56,6 +56,8 @@ LLVM_DUMP_METHOD void DominanceFrontierWrapperPass::dump() const {
|
||||
}
|
||||
#endif
|
||||
|
||||
template class llvm::AnalysisBase<DominanceFrontierAnalysis>;
|
||||
|
||||
DominanceFrontier DominanceFrontierAnalysis::run(Function &F,
|
||||
FunctionAnalysisManager *AM) {
|
||||
DominanceFrontier DF;
|
||||
|
@ -1499,6 +1499,8 @@ LazyCallGraph::RefSCC *LazyCallGraph::getNextRefSCCInPostOrder() {
|
||||
}
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<LazyCallGraphAnalysis>;
|
||||
|
||||
LazyCallGraphPrinterPass::LazyCallGraphPrinterPass(raw_ostream &OS) : OS(OS) {}
|
||||
|
||||
static void printNode(raw_ostream &OS, LazyCallGraph::Node &N) {
|
||||
|
@ -641,6 +641,8 @@ void LoopInfo::markAsRemoved(Loop *Unloop) {
|
||||
}
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<LoopAnalysis>;
|
||||
|
||||
LoopInfo LoopAnalysis::run(Function &F, AnalysisManager<Function> *AM) {
|
||||
// FIXME: Currently we create a LoopInfo from scratch for every function.
|
||||
// This may prove to be too wasteful due to deallocating and re-allocating
|
||||
|
@ -16,5 +16,6 @@ namespace llvm {
|
||||
template class PassManager<Loop>;
|
||||
template class AnalysisManager<Loop>;
|
||||
template class InnerAnalysisManagerProxy<LoopAnalysisManager, Function>;
|
||||
template class AnalysisBase<LoopAnalysisManagerFunctionProxy>;
|
||||
template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop>;
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ FunctionPass* llvm::createPostDomTree() {
|
||||
return new PostDominatorTreeWrapperPass();
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<PostDominatorTreeAnalysis>;
|
||||
|
||||
PostDominatorTree PostDominatorTreeAnalysis::run(Function &F) {
|
||||
PostDominatorTree PDT;
|
||||
PDT.recalculate(F);
|
||||
|
@ -185,6 +185,8 @@ namespace llvm {
|
||||
// RegionInfoAnalysis implementation
|
||||
//
|
||||
|
||||
template class llvm::AnalysisBase<RegionInfoAnalysis>;
|
||||
|
||||
RegionInfo RegionInfoAnalysis::run(Function &F, AnalysisManager<Function> *AM) {
|
||||
RegionInfo RI;
|
||||
auto *DT = &AM->getResult<DominatorTreeAnalysis>(F);
|
||||
|
@ -9554,6 +9554,8 @@ void ScalarEvolution::verify() const {
|
||||
// TODO: Verify more things.
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<ScalarEvolutionAnalysis>;
|
||||
|
||||
ScalarEvolution ScalarEvolutionAnalysis::run(Function &F,
|
||||
AnalysisManager<Function> *AM) {
|
||||
return ScalarEvolution(F, AM->getResult<TargetLibraryAnalysis>(F),
|
||||
|
@ -636,6 +636,8 @@ TargetLibraryInfoWrapperPass::TargetLibraryInfoWrapperPass(
|
||||
initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<TargetLibraryAnalysis>;
|
||||
|
||||
// Register the basic pass.
|
||||
INITIALIZE_PASS(TargetLibraryInfoWrapperPass, "targetlibinfo",
|
||||
"Target Library Information", false, true)
|
||||
|
@ -377,6 +377,8 @@ TargetIRAnalysis::Result TargetIRAnalysis::run(const Function &F) {
|
||||
return TTICallback(F);
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<TargetIRAnalysis>;
|
||||
|
||||
TargetIRAnalysis::Result TargetIRAnalysis::getDefaultTTI(const Function &F) {
|
||||
return Result(F.getParent()->getDataLayout());
|
||||
}
|
||||
|
@ -308,6 +308,8 @@ DominatorTree DominatorTreeAnalysis::run(Function &F) {
|
||||
return DT;
|
||||
}
|
||||
|
||||
template class llvm::AnalysisBase<DominatorTreeAnalysis>;
|
||||
|
||||
DominatorTreePrinterPass::DominatorTreePrinterPass(raw_ostream &OS) : OS(OS) {}
|
||||
|
||||
PreservedAnalyses DominatorTreePrinterPass::run(Function &F,
|
||||
|
@ -20,5 +20,6 @@ template class PassManager<Function>;
|
||||
template class AnalysisManager<Module>;
|
||||
template class AnalysisManager<Function>;
|
||||
template class InnerAnalysisManagerProxy<FunctionAnalysisManager, Module>;
|
||||
template class AnalysisBase<FunctionAnalysisManagerModuleProxy>;
|
||||
template class OuterAnalysisManagerProxy<ModuleAnalysisManager, Function>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user