[GC] Simplify linking of GC builtin GC strategies

llvm-svn: 346569
This commit is contained in:
Philip Reames 2018-11-09 23:56:21 +00:00
parent f70ae59019
commit 2de52b53cc
3 changed files with 5 additions and 27 deletions

View File

@ -15,32 +15,18 @@
#define LLVM_CODEGEN_GCS_H
namespace llvm {
class GCStrategy;
class GCMetadataPrinter;
/// FIXME: Collector instances are not useful on their own. These no longer
/// serve any purpose except to link in the plugins.
/// Creates a CoreCLR-compatible garbage collector.
void linkCoreCLRGC();
/// Creates an ocaml-compatible garbage collector.
void linkOcamlGC();
/// Ensure the definition of the builtin GCs gets linked in
void linkAllBuiltinGCs();
/// Creates an ocaml-compatible metadata printer.
void linkOcamlGCPrinter();
/// Creates an erlang-compatible garbage collector.
void linkErlangGC();
/// Creates an erlang-compatible metadata printer.
void linkErlangGCPrinter();
/// Creates a shadow stack garbage collector. This collector requires no code
/// generator support.
void linkShadowStackGC();
void linkStatepointExampleGC();
}
#endif

View File

@ -36,11 +36,7 @@ namespace {
(void) llvm::createGreedyRegisterAllocator();
(void) llvm::createDefaultPBQPRegisterAllocator();
llvm::linkCoreCLRGC();
llvm::linkOcamlGC();
llvm::linkErlangGC();
llvm::linkShadowStackGC();
llvm::linkStatepointExampleGC();
llvm::linkAllBuiltinGCs();
(void) llvm::createBURRListDAGScheduler(nullptr,
llvm::CodeGenOpt::Default);

View File

@ -136,9 +136,5 @@ static GCRegistry::Add<StatepointGC> D("statepoint-example",
"an example strategy for statepoint");
static GCRegistry::Add<CoreCLRGC> E("coreclr", "CoreCLR-compatible GC");
// Provide hooks to ensure the containing library is fully loaded.
void llvm::linkErlangGC() {}
void llvm::linkOcamlGC() {}
void llvm::linkShadowStackGC() {}
void llvm::linkStatepointExampleGC() {}
void llvm::linkCoreCLRGC() {}
// Provide hook to ensure the containing library is fully loaded.
void llvm::linkAllBuiltinGCs() {}