1 //===-- Collectors.h - Garbage collector registry -------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the CollectorRegistry class, which is used to discover
11 // pluggable garbage collectors.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CODEGEN_GCS_H
16 #define LLVM_CODEGEN_GCS_H
18 #include "llvm/Support/Registry.h"
23 class GCMetadataPrinter;
25 /// The collector registry uses all the defaults from Registry.
27 typedef Registry<Collector> CollectorRegistry;
29 /// The GC assembly printer registry uses all the defaults from Registry.
31 typedef Registry<GCMetadataPrinter> GCMetadataPrinterRegistry;
33 /// FIXME: Collector instances are not useful on their own. These no longer
34 /// serve any purpose except to link in the plugins.
36 /// Creates an ocaml-compatible garbage collector.
37 Collector *createOcamlCollector();
39 /// Creates an ocaml-compatible metadata printer.
40 GCMetadataPrinter *createOcamlMetadataPrinter();
42 /// Creates a shadow stack garbage collector. This collector requires no code
43 /// generator support.
44 Collector *createShadowStackCollector();