Jim Laskey | 4bb9cbb | 2005-10-21 19:00:04 +0000 | [diff] [blame] | 1 | //===- SubtargetEmitter.h - Generate subtarget enumerations -----*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by James M. Laskey and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This tablegen backend emits subtarget enumerations. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef SUBTARGET_EMITTER_H |
| 15 | #define SUBTARGET_EMITTER_H |
| 16 | |
| 17 | #include "TableGenBackend.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | class SubtargetEmitter : public TableGenBackend { |
| 22 | RecordKeeper &Records; |
Jim Laskey | b3b1d5f | 2005-10-25 15:16:36 +0000 | [diff] [blame^] | 23 | |
| 24 | void FeatureEnumeration(std::ostream &OS); |
| 25 | void FeatureKeyValues(std::ostream &OS); |
| 26 | void CPUKeyValues(std::ostream &OS); |
| 27 | |
Jim Laskey | 4bb9cbb | 2005-10-21 19:00:04 +0000 | [diff] [blame] | 28 | public: |
| 29 | SubtargetEmitter(RecordKeeper &R) : Records(R) {} |
| 30 | |
| 31 | // run - Output the subtarget enumerations, returning true on failure. |
| 32 | void run(std::ostream &o); |
| 33 | |
| 34 | }; |
| 35 | |
| 36 | |
| 37 | } // End llvm namespace |
| 38 | |
| 39 | #endif |
| 40 | |
| 41 | |
| 42 | |