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.
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "revng/Model/FunctionEdgeBase.h"
|
|
#include "revng/Model/VerifyHelper.h"
|
|
|
|
/* TUPLE-TREE-YAML
|
|
name: FunctionEdge
|
|
doc: An edge on the CFG
|
|
type: struct
|
|
inherits: FunctionEdgeBase
|
|
fields: []
|
|
TUPLE-TREE-YAML */
|
|
|
|
#include "revng/Model/Generated/Early/FunctionEdge.h"
|
|
|
|
class model::FunctionEdge : public model::generated::FunctionEdge {
|
|
private:
|
|
static constexpr const FunctionEdgeType::Values
|
|
AssociatedType = FunctionEdgeType::DirectBranch;
|
|
|
|
public:
|
|
FunctionEdge() : model::generated::FunctionEdge() { Type = AssociatedType; }
|
|
FunctionEdge(MetaAddress Destination, FunctionEdgeType::Values Type) :
|
|
model::generated::FunctionEdge(Destination, Type) {}
|
|
|
|
public:
|
|
static bool classof(const FunctionEdgeBase *A) { return classof(A->key()); }
|
|
static bool classof(const Key &K) {
|
|
return not FunctionEdgeType::isCall(std::get<1>(K));
|
|
}
|
|
|
|
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/FunctionEdge.h"
|