mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
FPToSI.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
3
#pragma once
4
5
#include <memory>
6
#include <string>
7
#include <utility>
8
9
#include "
mini-llvm/ir/Constant.h
"
10
#include "
mini-llvm/ir/Instruction/FloatingToIntegerCastingOperator.h
"
11
#include "
mini-llvm/ir/InstructionVisitor.h
"
12
#include "
mini-llvm/ir/Type/IntegerType.h
"
13
#include "
mini-llvm/ir/Value.h
"
14
#include "
mini-llvm/utils/Compiler.h
"
15
16
namespace
mini_llvm::ir
{
17
18
class
MINI_LLVM_EXPORT
FPToSI
final :
public
FloatingToIntegerCastingOperator
{
19
public
:
20
FPToSI
(std::shared_ptr<Value>
value
, std::unique_ptr<IntegerType>
type
)
21
:
FloatingToIntegerCastingOperator
(std::move(
value
), std::move(
type
)) {}
22
23
std::shared_ptr<Constant>
fold
()
const override
;
24
25
void
accept
(
InstructionVisitor
&visitor)
override
{
26
visitor.
visitFPToSI
(*
this
);
27
}
28
29
void
accept
(
InstructionVisitor
&visitor)
const override
{
30
visitor.
visitFPToSI
(*
this
);
31
}
32
33
std::string
format
()
const override
;
34
std::unique_ptr<Value>
clone
()
const override
;
35
};
36
37
}
// namespace mini_llvm::ir
Compiler.h
MINI_LLVM_EXPORT
#define MINI_LLVM_EXPORT
Definition
Compiler.h:17
FloatingToIntegerCastingOperator.h
IntegerType.h
Value.h
mini_llvm::ir::FPToSI::accept
void accept(InstructionVisitor &visitor) override
Definition
FPToSI.h:25
mini_llvm::ir::FPToSI::accept
void accept(InstructionVisitor &visitor) const override
Definition
FPToSI.h:29
mini_llvm::ir::FPToSI::FPToSI
FPToSI(std::shared_ptr< Value > value, std::unique_ptr< IntegerType > type)
Definition
FPToSI.h:20
mini_llvm::ir::FPToSI::format
std::string format() const override
mini_llvm::ir::FPToSI::fold
std::shared_ptr< Constant > fold() const override
mini_llvm::ir::FPToSI::clone
std::unique_ptr< Value > clone() const override
mini_llvm::ir::FloatingToIntegerCastingOperator::FloatingToIntegerCastingOperator
FloatingToIntegerCastingOperator(std::shared_ptr< Value > value, std::unique_ptr< IntegerType > type)
Definition
FloatingToIntegerCastingOperator.h:37
mini_llvm::ir::FloatingToIntegerCastingOperator::type
std::unique_ptr< Type > type() const override
Definition
FloatingToIntegerCastingOperator.h:25
mini_llvm::ir::FloatingToIntegerCastingOperator::value
auto & value(this Self &&self)
Definition
FloatingToIntegerCastingOperator.h:21
mini_llvm::ir::InstructionVisitor
Definition
InstructionVisitor.h:58
mini_llvm::ir::InstructionVisitor::visitFPToSI
virtual void visitFPToSI(FPToSI &I)
Definition
InstructionVisitor.h:84
Constant.h
InstructionVisitor.h
mini_llvm::ir
Definition
Argument.h:13
include
mini-llvm
ir
Instruction
FPToSI.h
Generated by
1.17.0