LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCModuleYAML.h
Go to the documentation of this file.
1 //===- MCModuleYAML.h - MCModule YAMLIO implementation ----------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief This file declares classes for handling the YAML representation
12 /// of MCModule.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_MC_MCMODULEYAML_H
17 #define LLVM_MC_MCMODULEYAML_H
18 
19 #include "llvm/ADT/OwningPtr.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/MC/MCModule.h"
23 
24 namespace llvm {
25 
26 class MCInstrInfo;
27 class MCRegisterInfo;
28 
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);
33 
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);
38 
39 } // end namespace llvm
40 
41 #endif
const MCInstrInfo & MII
StringRef mcmodule2yaml(raw_ostream &OS, const MCModule &MCM, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
Dump a YAML representation of the MCModule MCM to OS.
const MCModule & MCM
StringRef yaml2mcmodule(OwningPtr< MCModule > &MCM, StringRef YamlContent, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
Creates a new module and returns it in MCM.
const MCRegisterInfo & MRI