aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/AsmMatcherEmitter.h
blob: 729c938fcd360cf57a370e15b672f97d8776175c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//===- AsmMatcherEmitter.h - Generate an assembly matcher -------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This tablegen backend emits a target specifier matcher for converting parsed
// assembly operands in the MCInst structures.
//
//===----------------------------------------------------------------------===//

#ifndef ASMMATCHER_EMITTER_H
#define ASMMATCHER_EMITTER_H

#include "TableGenBackend.h"
#include <map>
#include <vector>
#include <cassert>

namespace llvm {
  class AsmMatcherEmitter : public TableGenBackend {
    RecordKeeper &Records;
  public:
    AsmMatcherEmitter(RecordKeeper &R) : Records(R) {}

    // run - Output the matcher, returning true on failure.
    void run(raw_ostream &o);
  };
}
#endif