| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 1 | //===- Core/YamlKeyValues.h - Reads YAML ----------------------------------===// |
| 2 | // |
| 3 | // The LLVM Linker |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef LLD_CORE_YAML_KEY_VALUES_H_ |
| 11 | #define LLD_CORE_YAML_KEY_VALUES_H_ |
| 12 | |
| 13 | #include "lld/Core/Atom.h" |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 14 | #include "lld/Core/DefinedAtom.h" |
| Nick Kledzik | 6bc04c6 | 2012-02-22 21:56:59 +0000 | [diff] [blame] | 15 | #include "lld/Core/UndefinedAtom.h" |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 16 | |
| 17 | |
| 18 | namespace lld { |
| 19 | namespace yaml { |
| 20 | |
| 21 | class KeyValues { |
| 22 | public: |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 23 | static const char* const nameKeyword; |
| Nick Kledzik | 49d6cc8 | 2012-02-15 00:38:09 +0000 | [diff] [blame] | 24 | static const char* const refNameKeyword; |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 25 | static const char* const sectionNameKeyword; |
| 26 | static const char* const contentKeyword; |
| 27 | static const char* const sizeKeyword; |
| Nick Kledzik | 6bc04c6 | 2012-02-22 21:56:59 +0000 | [diff] [blame] | 28 | static const char* const loadNameKeyword; |
| 29 | static const char* const valueKeyword; |
| Nick Kledzik | 49d6cc8 | 2012-02-15 00:38:09 +0000 | [diff] [blame] | 30 | static const char* const fixupsKeyword; |
| Michael J. Spencer | 765792d | 2012-04-03 18:40:27 +0000 | [diff] [blame^] | 31 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 32 | static const char* const definitionKeyword; |
| 33 | static const Atom::Definition definitionDefault; |
| 34 | static Atom::Definition definition(const char*); |
| 35 | static const char* definition(Atom::Definition); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 36 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 37 | static const char* const scopeKeyword; |
| 38 | static const DefinedAtom::Scope scopeDefault; |
| 39 | static DefinedAtom::Scope scope(const char*); |
| 40 | static const char* scope(DefinedAtom::Scope); |
| Michael J. Spencer | 765792d | 2012-04-03 18:40:27 +0000 | [diff] [blame^] | 41 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 42 | static const char* const contentTypeKeyword; |
| 43 | static const DefinedAtom::ContentType contentTypeDefault; |
| 44 | static DefinedAtom::ContentType contentType(const char*); |
| 45 | static const char* contentType(DefinedAtom::ContentType); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 46 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 47 | static const char* const deadStripKindKeyword; |
| 48 | static const DefinedAtom::DeadStripKind deadStripKindDefault; |
| 49 | static DefinedAtom::DeadStripKind deadStripKind(const char*); |
| 50 | static const char* deadStripKind(DefinedAtom::DeadStripKind); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 51 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 52 | static const char* const sectionChoiceKeyword; |
| 53 | static const DefinedAtom::SectionChoice sectionChoiceDefault; |
| 54 | static DefinedAtom::SectionChoice sectionChoice(const char*); |
| 55 | static const char* sectionChoice(DefinedAtom::SectionChoice); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 56 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 57 | static const char* const interposableKeyword; |
| 58 | static const DefinedAtom::Interposable interposableDefault; |
| 59 | static DefinedAtom::Interposable interposable(const char*); |
| 60 | static const char* interposable(DefinedAtom::Interposable); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 61 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 62 | static const char* const mergeKeyword; |
| 63 | static const DefinedAtom::Merge mergeDefault; |
| 64 | static DefinedAtom::Merge merge(const char*); |
| 65 | static const char* merge(DefinedAtom::Merge); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 66 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 67 | static const char* const permissionsKeyword; |
| 68 | static const DefinedAtom::ContentPermissions permissionsDefault; |
| 69 | static DefinedAtom::ContentPermissions permissions(const char*); |
| 70 | static const char* permissions(DefinedAtom::ContentPermissions); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 71 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 72 | static const char* const isThumbKeyword; |
| 73 | static const bool isThumbDefault; |
| 74 | static bool isThumb(const char*); |
| 75 | static const char* isThumb(bool); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 76 | |
| Nick Kledzik | f4fb2c5 | 2012-01-11 01:06:19 +0000 | [diff] [blame] | 77 | static const char* const isAliasKeyword; |
| 78 | static const bool isAliasDefault; |
| 79 | static bool isAlias(const char*); |
| 80 | static const char* isAlias(bool); |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 81 | |
| Nick Kledzik | 6bc04c6 | 2012-02-22 21:56:59 +0000 | [diff] [blame] | 82 | static const char* const canBeNullKeyword; |
| 83 | static const UndefinedAtom::CanBeNull canBeNullDefault; |
| 84 | static UndefinedAtom::CanBeNull canBeNull(const char*); |
| 85 | static const char* canBeNull(UndefinedAtom::CanBeNull); |
| Nick Kledzik | 23384e8 | 2012-02-07 02:59:54 +0000 | [diff] [blame] | 86 | |
| Nick Kledzik | 49d6cc8 | 2012-02-15 00:38:09 +0000 | [diff] [blame] | 87 | |
| 88 | static const char* const fixupsKindKeyword; |
| 89 | static const char* const fixupsOffsetKeyword; |
| 90 | static const char* const fixupsTargetKeyword; |
| 91 | static const char* const fixupsAddendKeyword; |
| 92 | |
| Nick Kledzik | 7735a7d | 2012-01-04 23:58:17 +0000 | [diff] [blame] | 93 | }; |
| 94 | |
| 95 | } // namespace yaml |
| 96 | } // namespace lld |
| 97 | |
| 98 | #endif // LLD_CORE_YAML_KEY_VALUES_H_ |
| 99 | |