mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
863652f480
The goal of `OriginalName` is to keep track of the original name of a symbol upon import. In future, this will also be used to promote it to `CustomName`.
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "revng/ADT/SortedVector.h"
|
|
#include "revng/Model/Identifier.h"
|
|
#include "revng/Model/VerifyHelper.h"
|
|
|
|
/* TUPLE-TREE-YAML
|
|
name: EnumEntry
|
|
doc: An entry in a model enum, with a name and a value
|
|
type: struct
|
|
fields:
|
|
- name: Value
|
|
type: uint64_t
|
|
- name: CustomName
|
|
type: Identifier
|
|
optional: true
|
|
- name: OriginalName
|
|
type: std::string
|
|
optional: true
|
|
key:
|
|
- Value
|
|
TUPLE-TREE-YAML */
|
|
|
|
#include "revng/Model/Generated/Early/EnumEntry.h"
|
|
|
|
class model::EnumEntry : public model::generated::EnumEntry {
|
|
public:
|
|
using generated::EnumEntry::EnumEntry;
|
|
|
|
public:
|
|
// The entry should have a non-empty name, the name should not be a valid
|
|
// alias, and there should not be empty aliases.
|
|
bool verify() const debug_function;
|
|
bool verify(bool Assert) const debug_function;
|
|
bool verify(VerifyHelper &VH) const;
|
|
void dump() const debug_function;
|
|
};
|
|
|
|
#include "revng/Model/Generated/Late/EnumEntry.h"
|