Daniel Dunbar | d51ffcf | 2009-07-11 19:39:44 +0000 | [diff] [blame] | 1 | //===- AsmMatcherEmitter.h - Generate an assembly matcher -------*- 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 emits a target specifier matcher for converting parsed |
| 11 | // assembly operands in the MCInst structures. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef ASMMATCHER_EMITTER_H |
| 16 | #define ASMMATCHER_EMITTER_H |
| 17 | |
| 18 | #include "TableGenBackend.h" |
| 19 | #include <map> |
| 20 | #include <vector> |
| 21 | #include <cassert> |
| 22 | |
| 23 | namespace llvm { |
| 24 | class AsmMatcherEmitter : public TableGenBackend { |
| 25 | RecordKeeper &Records; |
| 26 | public: |
| 27 | AsmMatcherEmitter(RecordKeeper &R) : Records(R) {} |
| 28 | |
| 29 | // run - Output the matcher, returning true on failure. |
| 30 | void run(raw_ostream &o); |
| 31 | }; |
| 32 | } |
| 33 | #endif |