1 //===- MCModuleYAML.h - MCModule YAMLIO implementation ----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief This file declares classes for handling the YAML representation
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_MC_MCMODULEYAML_H
17 #define LLVM_MC_MCMODULEYAML_H
19 #include "llvm/ADT/OwningPtr.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/MC/MCModule.h"
22 #include "llvm/Support/raw_ostream.h"
29 /// \brief Dump a YAML representation of the MCModule \p MCM to \p OS.
30 /// \returns The empty string on success, an error message on failure.
31 StringRef mcmodule2yaml(raw_ostream &OS, const MCModule &MCM,
32 const MCInstrInfo &MII, const MCRegisterInfo &MRI);
34 /// \brief Creates a new module and returns it in \p MCM.
35 /// \returns The empty string on success, an error message on failure.
36 StringRef yaml2mcmodule(OwningPtr<MCModule> &MCM, StringRef YamlContent,
37 const MCInstrInfo &MII, const MCRegisterInfo &MRI);
39 } // end namespace llvm