llir-opt  0.0.1
Low-Level Post-Link Optimiser for OCaml and C
get_parser.h
1 // This file if part of the llir-opt project.
2 // Licensing information can be found in the LICENSE file.
3 // (C) 2018 Nandor Licker. All rights reserved.
4 
5 #pragma once
6 
7 #include <llvm/TableGen/Record.h>
8 
9 
10 
15 public:
16  GetParserWriter(llvm::RecordKeeper &records) : records_(records) {}
17 
18  void run(llvm::raw_ostream &OS);
19 
20 private:
21  using RecordList = std::vector<llvm::Record *>;
22 
23  void PrintTrie(
24  llvm::raw_ostream &OS,
25  unsigned index,
26  RecordList::iterator begin,
27  RecordList::iterator end
28  );
29 
30  void PrintParser(llvm::raw_ostream &OS, llvm::Record *r);
31 
32 private:
33  llvm::RecordKeeper &records_;
34 };
GetParserWriter
Definition: get_parser.h:14