mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
74217b4fe5
Model classes are now described by a YAML document, which is used to generate C++ headers containing classes and all the boilerplate required for YAML serialization/deserialization, usage in SortedVectors, etc. See the README in include/revng/Model for more info.
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "revng/ADT/MutableSet.h"
|
|
#include "revng/Model/Identifier.h"
|
|
#include "revng/Model/Types.h"
|
|
#include "revng/Model/VerifyHelper.h"
|
|
|
|
/* TUPLE-TREE-YAML
|
|
name: DynamicFunction
|
|
doc: Function defined in a dynamic library
|
|
type: struct
|
|
fields:
|
|
- name: SymbolName
|
|
doc: The name of the symbol for this dynamic function
|
|
type: std::string
|
|
- name: CustomName
|
|
doc: An optional custom name
|
|
type: Identifier
|
|
optional: true
|
|
- name: Prototype
|
|
doc: The prototype of the function
|
|
reference:
|
|
pointeeType: model::Type
|
|
rootType: model::Binary
|
|
- name: Attributes
|
|
doc: Function attributes
|
|
sequence:
|
|
type: MutableSet
|
|
elementType: model::FunctionAttribute::Values
|
|
optional: true
|
|
key:
|
|
- SymbolName
|
|
TUPLE-TREE-YAML */
|
|
|
|
#include "revng/Model/Generated/Early/DynamicFunction.h"
|
|
|
|
class model::DynamicFunction : public model::generated::DynamicFunction {
|
|
public:
|
|
using generated::DynamicFunction::DynamicFunction;
|
|
|
|
public:
|
|
Identifier name() const;
|
|
|
|
public:
|
|
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/DynamicFunction.h"
|