diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-08-11 21:14:08 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-08-11 21:15:26 -0700 |
| commit | e8d170beae28f99bd7075a6dde4dcb20d6126b68 (patch) | |
| tree | 9608aa1aaf0c7f5105b33f1e6bd8b4c9b2ae99da /src/rustllvm/RustGCStrategy.cpp | |
| parent | 0a22f91c9cf4b2a54f05a5d58a23459c0f6fb590 (diff) | |
| download | rust-e8d170beae28f99bd7075a6dde4dcb20d6126b68.tar.gz rust-e8d170beae28f99bd7075a6dde4dcb20d6126b68.zip | |
rt: Stub Rust GC metadata printer and Rust GC strategy modules
Diffstat (limited to 'src/rustllvm/RustGCStrategy.cpp')
| -rw-r--r-- | src/rustllvm/RustGCStrategy.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/rustllvm/RustGCStrategy.cpp b/src/rustllvm/RustGCStrategy.cpp new file mode 100644 index 00000000000..0c86856939c --- /dev/null +++ b/src/rustllvm/RustGCStrategy.cpp @@ -0,0 +1,34 @@ +//===- RustGCStrategy.cpp - Rust garbage collection strategy ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the garbage collection strategy for Rust. +// +//===----------------------------------------------------------------------===// + +#include "llvm/CodeGen/GCs.h" +#include "llvm/CodeGen/GCStrategy.h" + +using namespace llvm; + +namespace { + class RustGCStrategy : public GCStrategy { + public: + RustGCStrategy(); + }; +} + +static GCRegistry::Add<RustGCStrategy> +X("rust", "Rust GC"); + +RustGCStrategy::RustGCStrategy() { + NeededSafePoints = 1 << GC::PostCall; + UsesMetadata = true; +} + + |
