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/StringRef.h"
20 #include "llvm/MC/MCModule.h"
21 #include "llvm/Support/raw_ostream.h"
28 /// \brief Dump a YAML representation of the MCModule \p MCM to \p OS.
29 /// \returns The empty string on success, an error message on failure.
30 StringRef mcmodule2yaml(raw_ostream &OS, const MCModule &MCM,
31 const MCInstrInfo &MII, const MCRegisterInfo &MRI);
33 /// \brief Creates a new module and returns it in \p MCM.
34 /// \returns The empty string on success, an error message on failure.
35 StringRef yaml2mcmodule(std::unique_ptr<MCModule> &MCM, StringRef YamlContent,
36 const MCInstrInfo &MII, const MCRegisterInfo &MRI);
38 } // end namespace llvm