Files
revng-revng/include/revng/Model/Function.h
Antonio Frighetto 20cdfe668a EFA: take the control-flow graph out of the model
The control-flow graph and all its hierarchy components
have been moved from `model` to `efa`. The CFG is now
serialized onto the LLVM IR module as a metadata.
2022-04-05 15:37:57 +02:00

87 lines
2.1 KiB
C++

#pragma once
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "revng/ADT/MutableSet.h"
#include "revng/ADT/SortedVector.h"
#include "revng/Model/CallSitePrototype.h"
#include "revng/Model/FunctionAttribute.h"
#include "revng/Model/FunctionType.h"
#include "revng/Model/Identifier.h"
#include "revng/Model/Type.h"
#include "revng/Model/VerifyHelper.h"
#include "revng/Support/MetaAddress.h"
#include "revng/Support/MetaAddress/YAMLTraits.h"
#include "revng/TupleTree/TupleTree.h"
/* TUPLE-TREE-YAML
name: Function
doc: A function
type: struct
fields:
- name: Entry
doc: |
The address of the entry point
\note This does not necessarily correspond to the address of the basic
block with the lowest address.
type: MetaAddress
- name: CustomName
doc: An optional custom name
type: Identifier
optional: true
- name: OriginalName
type: std::string
optional: true
- name: Type
doc: Type of the function
type: model::FunctionType::Values
- name: StackFrameType
doc: The type of the stack frame
reference:
pointeeType: model::Type
rootType: model::Binary
optional: true
- name: Prototype
doc: The prototype of the function
reference:
pointeeType: model::Type
rootType: model::Binary
optional: true
- name: Attributes
doc: Attributes for this call site
sequence:
type: MutableSet
elementType: model::FunctionAttribute::Values
optional: true
- name: CallSitePrototypes
sequence:
type: SortedVector
elementType: model::CallSitePrototype
optional: true
key:
- Entry
TUPLE-TREE-YAML */
#include "revng/Model/Generated/Early/Function.h"
class model::Function : public model::generated::Function {
public:
using generated::Function::Function;
public:
Identifier name() const;
const model::TypePath &prototype(const model::Binary &Root) 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/Function.h"