summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIR/MIRPrinter.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-05-19 21:41:28 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-05-19 21:41:28 +0000
commitde1970fe668a345b4dd033a82581b2cf50b0cfe4 (patch)
tree3fb0d5e4d4e8e0a51f80c6246ff11c8f84b8da75 /llvm/lib/CodeGen/MIR/MIRPrinter.cpp
parentbf178d3eb76e4552ce217d9830536fc2f6f53fcb (diff)
downloadbcm5719-llvm-de1970fe668a345b4dd033a82581b2cf50b0cfe4.tar.gz
bcm5719-llvm-de1970fe668a345b4dd033a82581b2cf50b0cfe4.zip
Revert r237708 (MIR serialization) - incremental buildbots became unstable.
The incremental buildbots entered a pass-fail cycle where during the fail cycle one of the tests from this commit fails for an unknown reason. I have reverted this commit and will investigate the cause of this problem. llvm-svn: 237730
Diffstat (limited to 'llvm/lib/CodeGen/MIR/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIR/MIRPrinter.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/llvm/lib/CodeGen/MIR/MIRPrinter.cpp b/llvm/lib/CodeGen/MIR/MIRPrinter.cpp
deleted file mode 100644
index fae22286d61..00000000000
--- a/llvm/lib/CodeGen/MIR/MIRPrinter.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-//===- MIRPrinter.cpp - MIR serialization format printer ------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the class that prints out the LLVM IR and machine
-// functions using the MIR serialization format.
-//
-//===----------------------------------------------------------------------===//
-
-#include "MIRPrinter.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/YAMLTraits.h"
-
-using namespace llvm;
-
-namespace {
-
-/// This class prints out the LLVM IR using the MIR serialization format and
-/// YAML I/O.
-class MIRPrinter {
- raw_ostream &OS;
-
-public:
- MIRPrinter(raw_ostream &OS);
-
- void printModule(const Module &Mod);
-};
-
-} // end anonymous namespace
-
-namespace llvm {
-namespace yaml {
-
-/// This struct serializes the LLVM IR module.
-template <> struct BlockScalarTraits<Module> {
- static void output(const Module &Mod, void *Ctxt, raw_ostream &OS) {
- Mod.print(OS, nullptr);
- }
- static StringRef input(StringRef Str, void *Ctxt, Module &Mod) {
- llvm_unreachable("LLVM Module is supposed to be parsed separately");
- return "";
- }
-};
-
-} // end namespace yaml
-} // end namespace llvm
-
-MIRPrinter::MIRPrinter(raw_ostream &OS) : OS(OS) {}
-
-void MIRPrinter::printModule(const Module &Mod) {
- yaml::Output Out(OS);
- Out << const_cast<Module &>(Mod);
-}
-
-void llvm::printMIR(raw_ostream &OS, const Module &Mod) {
- MIRPrinter Printer(OS);
- Printer.printModule(Mod);
-}
OpenPOWER on IntegriCloud