about summary refs log tree commit diff
path: root/src/rustllvm/RustGCMetadataPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustllvm/RustGCMetadataPrinter.cpp')
-rw-r--r--src/rustllvm/RustGCMetadataPrinter.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/rustllvm/RustGCMetadataPrinter.cpp b/src/rustllvm/RustGCMetadataPrinter.cpp
new file mode 100644
index 00000000000..d17d7da1703
--- /dev/null
+++ b/src/rustllvm/RustGCMetadataPrinter.cpp
@@ -0,0 +1,45 @@
+//===-- RustGCPrinter.cpp - Rust garbage collection map printer -----------===//
+//
+//                     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 emitter for the Rust garbage collection stack maps.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/GCs.h"
+#include "llvm/CodeGen/AsmPrinter.h"
+#include "llvm/CodeGen/GCMetadataPrinter.h"
+#include "llvm/Module.h"
+#include "llvm/MC/MCAsmInfo.h"
+#include "llvm/MC/MCContext.h"
+#include "llvm/MC/MCSymbol.h"
+#include "llvm/MC/MCStreamer.h"
+#include "llvm/Target/Mangler.h"
+#include "llvm/Target/TargetData.h"
+#include "llvm/Target/TargetLoweringObjectFile.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/FormattedStream.h"
+#include <cctype>
+
+using namespace llvm;
+
+namespace {
+
+  class RustGCMetadataPrinter : public GCMetadataPrinter {
+  public:
+    void beginAssembly(AsmPrinter &AP) {};
+    void finishAssembly(AsmPrinter &AP) {};
+  };
+
+}
+
+static GCMetadataPrinterRegistry::Add<RustGCMetadataPrinter>
+Y("rust", "Rust GC metadata printer");
+