Peter Collingbourne | 51d7777 | 2011-10-06 13:03:08 +0000 | [diff] [blame] | 1 | //===- ClangAttrEmitter.h - Generate Clang attribute handling =-*- 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 | // These tablegen backends emit Clang attribute processing code |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef CLANGATTR_EMITTER_H |
| 15 | #define CLANGATTR_EMITTER_H |
| 16 | |
| 17 | #include "llvm/TableGen/TableGenBackend.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | /// ClangAttrClassEmitter - class emits the class defintions for attributes for |
| 22 | /// clang. |
| 23 | class ClangAttrClassEmitter : public TableGenBackend { |
| 24 | RecordKeeper &Records; |
| 25 | |
| 26 | public: |
| 27 | explicit ClangAttrClassEmitter(RecordKeeper &R) |
| 28 | : Records(R) |
| 29 | {} |
| 30 | |
| 31 | void run(raw_ostream &OS); |
| 32 | }; |
| 33 | |
| 34 | /// ClangAttrImplEmitter - class emits the class method defintions for |
| 35 | /// attributes for clang. |
| 36 | class ClangAttrImplEmitter : public TableGenBackend { |
| 37 | RecordKeeper &Records; |
| 38 | |
| 39 | public: |
| 40 | explicit ClangAttrImplEmitter(RecordKeeper &R) |
| 41 | : Records(R) |
| 42 | {} |
| 43 | |
| 44 | void run(raw_ostream &OS); |
| 45 | }; |
| 46 | |
| 47 | /// ClangAttrListEmitter - class emits the enumeration list for attributes for |
| 48 | /// clang. |
| 49 | class ClangAttrListEmitter : public TableGenBackend { |
| 50 | RecordKeeper &Records; |
| 51 | |
| 52 | public: |
| 53 | explicit ClangAttrListEmitter(RecordKeeper &R) |
| 54 | : Records(R) |
| 55 | {} |
| 56 | |
| 57 | void run(raw_ostream &OS); |
| 58 | }; |
| 59 | |
| 60 | /// ClangAttrPCHReadEmitter - class emits the code to read an attribute from |
| 61 | /// a clang precompiled header. |
| 62 | class ClangAttrPCHReadEmitter : public TableGenBackend { |
| 63 | RecordKeeper &Records; |
| 64 | |
| 65 | public: |
| 66 | explicit ClangAttrPCHReadEmitter(RecordKeeper &R) |
| 67 | : Records(R) |
| 68 | {} |
| 69 | |
| 70 | void run(raw_ostream &OS); |
| 71 | }; |
| 72 | |
| 73 | /// ClangAttrPCHWriteEmitter - class emits the code to read an attribute from |
| 74 | /// a clang precompiled header. |
| 75 | class ClangAttrPCHWriteEmitter : public TableGenBackend { |
| 76 | RecordKeeper &Records; |
| 77 | |
| 78 | public: |
| 79 | explicit ClangAttrPCHWriteEmitter(RecordKeeper &R) |
| 80 | : Records(R) |
| 81 | {} |
| 82 | |
| 83 | void run(raw_ostream &OS); |
| 84 | }; |
| 85 | |
| 86 | /// ClangAttrSpellingListEmitter - class emits the list of spellings for attributes for |
| 87 | /// clang. |
| 88 | class ClangAttrSpellingListEmitter : public TableGenBackend { |
| 89 | RecordKeeper &Records; |
| 90 | |
| 91 | public: |
| 92 | explicit ClangAttrSpellingListEmitter(RecordKeeper &R) |
| 93 | : Records(R) |
| 94 | {} |
| 95 | |
| 96 | void run(raw_ostream &OS); |
| 97 | }; |
| 98 | |
| 99 | /// ClangAttrLateParsedListEmitter emits the LateParsed property for attributes |
| 100 | /// for clang. |
| 101 | class ClangAttrLateParsedListEmitter : public TableGenBackend { |
| 102 | RecordKeeper &Records; |
| 103 | |
| 104 | public: |
| 105 | explicit ClangAttrLateParsedListEmitter(RecordKeeper &R) |
| 106 | : Records(R) |
| 107 | {} |
| 108 | |
| 109 | void run(raw_ostream &OS); |
| 110 | }; |
| 111 | |
DeLesley Hutchins | 7b9ff0c | 2012-01-20 22:37:06 +0000 | [diff] [blame] | 112 | /// ClangAttrTemplateInstantiateEmitter emits code to instantiate dependent |
| 113 | /// attributes on templates. |
| 114 | class ClangAttrTemplateInstantiateEmitter : public TableGenBackend { |
| 115 | RecordKeeper &Records; |
| 116 | |
| 117 | public: |
| 118 | explicit ClangAttrTemplateInstantiateEmitter(RecordKeeper &R) |
| 119 | : Records(R) |
| 120 | {} |
| 121 | |
| 122 | void run(raw_ostream &OS); |
| 123 | }; |
| 124 | |
Michael Han | e53ac8a | 2012-03-07 00:12:16 +0000 | [diff] [blame] | 125 | /// ClangAttrParsedAttrListEmitter emits the list of parsed attributes |
| 126 | /// for clang. |
| 127 | class ClangAttrParsedAttrListEmitter : public TableGenBackend { |
| 128 | RecordKeeper &Records; |
| 129 | |
| 130 | public: |
| 131 | explicit ClangAttrParsedAttrListEmitter(RecordKeeper &R) |
| 132 | : Records(R) |
| 133 | {} |
| 134 | |
| 135 | void run(raw_ostream &OS); |
| 136 | }; |
| 137 | |
| 138 | /// ClangAttrParsedAttrKindsEmitter emits the kind list of parsed attributes |
| 139 | /// for clang. |
| 140 | class ClangAttrParsedAttrKindsEmitter : public TableGenBackend { |
| 141 | RecordKeeper &Records; |
| 142 | |
| 143 | public: |
| 144 | explicit ClangAttrParsedAttrKindsEmitter(RecordKeeper &R) |
| 145 | : Records(R) |
| 146 | {} |
| 147 | |
| 148 | void run(raw_ostream &OS); |
| 149 | }; |
| 150 | |
Peter Collingbourne | 51d7777 | 2011-10-06 13:03:08 +0000 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | #endif |