Mercurial > hg > Members > tobaru > cbc > CbC_llvm
view lib/CodeGen/OcamlGC.cpp @ 28:273f76252412
create __CbC_env automatically when input file contains code segment
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 08 Dec 2013 00:16:12 +0900 |
parents | 9ad51c7bc036 |
children | 60c9769439b8 |
line wrap: on
line source
//===-- OcamlGC.cpp - Ocaml frametable GC strategy ------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file implements lowering for the llvm.gc* intrinsics compatible with // Objective Caml 3.10.0, which uses a liveness-accurate static stack map. // // The frametable emitter is in OcamlGCPrinter.cpp. // //===----------------------------------------------------------------------===// #include "llvm/CodeGen/GCs.h" #include "llvm/CodeGen/GCStrategy.h" using namespace llvm; namespace { class OcamlGC : public GCStrategy { public: OcamlGC(); }; } static GCRegistry::Add<OcamlGC> X("ocaml", "ocaml 3.10-compatible GC"); void llvm::linkOcamlGC() { } OcamlGC::OcamlGC() { NeededSafePoints = 1 << GC::PostCall; UsesMetadata = true; }