• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- CallingConvEmitter.h - Generate calling conventions ------*- 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 // This tablegen backend is responsible for emitting descriptions of the calling
11 // conventions supported by this target.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef CALLINGCONV_EMITTER_H
16 #define CALLINGCONV_EMITTER_H
17 
18 #include "llvm/TableGen/TableGenBackend.h"
19 #include <cassert>
20 
21 namespace llvm {
22   class CallingConvEmitter : public TableGenBackend {
23     RecordKeeper &Records;
24   public:
CallingConvEmitter(RecordKeeper & R)25     explicit CallingConvEmitter(RecordKeeper &R) : Records(R) {}
26 
27     // run - Output the asmwriter, returning true on failure.
28     void run(raw_ostream &o);
29 
30   private:
31     void EmitCallingConv(Record *CC, raw_ostream &O);
32     void EmitAction(Record *Action, unsigned Indent, raw_ostream &O);
33     unsigned Counter;
34   };
35 }
36 #endif
37