Factor GC metadata table assembly generation out of Collector in preparation for...
[oota-llvm.git] / include / llvm / CodeGen / GCs.h
1 //===-- Collectors.h - Garbage collector registry -------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the CollectorRegistry class, which is used to discover
11 // pluggable garbage collectors.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CODEGEN_GCS_H
16 #define LLVM_CODEGEN_GCS_H
17
18 #include "llvm/Support/Registry.h"
19
20 namespace llvm {
21
22   class Collector;
23   class GCMetadataPrinter;
24   
25   /// The collector registry uses all the defaults from Registry.
26   /// 
27   typedef Registry<Collector> CollectorRegistry;
28   
29   /// The GC assembly printer registry uses all the defaults from Registry.
30   /// 
31   typedef Registry<GCMetadataPrinter> GCMetadataPrinterRegistry;
32   
33   /// FIXME: Collector instances are not useful on their own. These no longer
34   ///        serve any purpose except to link in the plugins.
35   
36   /// Creates an ocaml-compatible garbage collector.
37   Collector *createOcamlCollector();
38   
39   /// Creates an ocaml-compatible metadata printer.
40   GCMetadataPrinter *createOcamlMetadataPrinter();
41   
42   /// Creates a shadow stack garbage collector. This collector requires no code
43   /// generator support.
44   Collector *createShadowStackCollector();
45 }
46
47 #endif