blob: 7bddd6c93effc133809a3b3afe07b867be54c792 [file] [log] [blame]
Chris Lattner88ee2a12007-02-27 22:05:51 +00001//===- CallingConvEmitter.h - Generate calling conventions ------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner30609102007-12-29 20:37:13 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Chris Lattner88ee2a12007-02-27 22:05:51 +00007//
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
Peter Collingbourne7c788882011-10-01 16:41:13 +000018#include "llvm/TableGen/TableGenBackend.h"
Chris Lattner88ee2a12007-02-27 22:05:51 +000019#include <cassert>
20
21namespace llvm {
22 class CallingConvEmitter : public TableGenBackend {
23 RecordKeeper &Records;
24 public:
Dan Gohmanf4522072007-07-30 14:51:59 +000025 explicit CallingConvEmitter(RecordKeeper &R) : Records(R) {}
Chris Lattner88ee2a12007-02-27 22:05:51 +000026
27 // run - Output the asmwriter, returning true on failure.
Daniel Dunbar1a551802009-07-03 00:10:29 +000028 void run(raw_ostream &o);
Chris Lattner88ee2a12007-02-27 22:05:51 +000029
30 private:
Daniel Dunbar1a551802009-07-03 00:10:29 +000031 void EmitCallingConv(Record *CC, raw_ostream &O);
32 void EmitAction(Record *Action, unsigned Indent, raw_ostream &O);
Chris Lattner88ee2a12007-02-27 22:05:51 +000033 unsigned Counter;
34 };
35}
36#endif