Files
revng-revng/lib/Yield/ControlFlow/ConvertFromEFA.cpp
T
Alessandro Di Federico 974dd0c680 yield::Function: do not use efa::BasicBlock
This change introduces some duplication but ensures an important
property of `tuple_tree_generate`d: data structures: all the leaves are
scalars. Previously, yield::Function was using efa::BasicBlock, making
things more difficult under certain conditions.
Specifically, we can rely on the fact that, when generating a visit to
the TupleTree, we know everything about all non-scalars.
2022-12-09 10:11:27 +01:00

29 lines
925 B
C++

/// \file ConvertFromEFA.cpp
/// \brief
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "revng/EarlyFunctionAnalysis/CallEdge.h"
#include "revng/EarlyFunctionAnalysis/FunctionEdge.h"
#include "revng/EarlyFunctionAnalysis/FunctionEdgeBase.h"
#include "revng/Yield/CallEdge.h"
#include "revng/Yield/FunctionEdge.h"
#include "revng/Yield/FunctionEdgeBase.h"
yield::CallEdge::CallEdge(const efa::CallEdge &Source) {
Kind = yield::FunctionEdgeBaseKind::CallEdge;
Destination = Source.Destination;
Type = yield::FunctionEdgeType::from(Source.Type);
DynamicFunction = Source.DynamicFunction;
IsTailCall = Source.IsTailCall;
Attributes = Source.Attributes;
}
yield::FunctionEdge::FunctionEdge(const efa::FunctionEdge &Source) {
Kind = yield::FunctionEdgeBaseKind::FunctionEdge;
Destination = Source.Destination;
Type = yield::FunctionEdgeType::from(Source.Type);
}