Chris Lattner | 88ee2a1 | 2007-02-27 22:05:51 +0000 | [diff] [blame] | 1 | //===- CallingConvEmitter.h - Generate calling conventions ------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 3060910 | 2007-12-29 20:37:13 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Chris Lattner | 88ee2a1 | 2007-02-27 22:05:51 +0000 | [diff] [blame] | 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 "TableGenBackend.h" |
| 19 | #include <map> |
| 20 | #include <vector> |
| 21 | #include <cassert> |
| 22 | |
| 23 | namespace llvm { |
| 24 | class CallingConvEmitter : public TableGenBackend { |
| 25 | RecordKeeper &Records; |
| 26 | public: |
Dan Gohman | f452207 | 2007-07-30 14:51:59 +0000 | [diff] [blame] | 27 | explicit CallingConvEmitter(RecordKeeper &R) : Records(R) {} |
Chris Lattner | 88ee2a1 | 2007-02-27 22:05:51 +0000 | [diff] [blame] | 28 | |
| 29 | // run - Output the asmwriter, returning true on failure. |
| 30 | void run(std::ostream &o); |
| 31 | |
| 32 | private: |
| 33 | void EmitCallingConv(Record *CC, std::ostream &O); |
| 34 | void EmitAction(Record *Action, unsigned Indent, std::ostream &O); |
| 35 | unsigned Counter; |
| 36 | }; |
| 37 | } |
| 38 | #endif |