mini-llvm 0.1.0
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
13#include "mini-llvm/ir/Value.h"
15
16namespace mini_llvm::ir {
17
19public:
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
#define MINI_LLVM_EXPORT
Definition Compiler.h:17
void accept(InstructionVisitor &visitor) override
Definition FPToSI.h:25
void accept(InstructionVisitor &visitor) const override
Definition FPToSI.h:29
FPToSI(std::shared_ptr< Value > value, std::unique_ptr< IntegerType > type)
Definition FPToSI.h:20
std::string format() const override
std::shared_ptr< Constant > fold() const override
std::unique_ptr< Value > clone() const override
FloatingToIntegerCastingOperator(std::shared_ptr< Value > value, std::unique_ptr< IntegerType > type)
Definition FloatingToIntegerCastingOperator.h:37
std::unique_ptr< Type > type() const override
Definition FloatingToIntegerCastingOperator.h:25
auto & value(this Self &&self)
Definition FloatingToIntegerCastingOperator.h:21
Definition InstructionVisitor.h:58
virtual void visitFPToSI(FPToSI &I)
Definition InstructionVisitor.h:84
Definition Argument.h:13