mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
FNeg.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/UnaryFloatingArithmeticOperator.h
"
11
#include "
mini-llvm/ir/InstructionVisitor.h
"
12
#include "
mini-llvm/ir/Value.h
"
13
#include "
mini-llvm/utils/Compiler.h
"
14
15
namespace
mini_llvm::ir
{
16
17
class
MINI_LLVM_EXPORT
FNeg
final :
public
UnaryFloatingArithmeticOperator
{
18
public
:
19
explicit
FNeg
(std::shared_ptr<Value>
value
) :
UnaryFloatingArithmeticOperator
(std::move(
value
)) {}
20
21
std::shared_ptr<Constant>
fold
()
const override
;
22
23
void
accept
(
InstructionVisitor
&visitor)
override
{
24
visitor.
visitFNeg
(*
this
);
25
}
26
27
void
accept
(
InstructionVisitor
&visitor)
const override
{
28
visitor.
visitFNeg
(*
this
);
29
}
30
31
std::string
format
()
const override
;
32
std::unique_ptr<Value>
clone
()
const override
;
33
};
34
35
}
// namespace mini_llvm::ir
Compiler.h
MINI_LLVM_EXPORT
#define MINI_LLVM_EXPORT
Definition
Compiler.h:17
UnaryFloatingArithmeticOperator.h
Value.h
mini_llvm::ir::FNeg::clone
std::unique_ptr< Value > clone() const override
mini_llvm::ir::FNeg::accept
void accept(InstructionVisitor &visitor) const override
Definition
FNeg.h:27
mini_llvm::ir::FNeg::format
std::string format() const override
mini_llvm::ir::FNeg::fold
std::shared_ptr< Constant > fold() const override
mini_llvm::ir::FNeg::FNeg
FNeg(std::shared_ptr< Value > value)
Definition
FNeg.h:19
mini_llvm::ir::FNeg::accept
void accept(InstructionVisitor &visitor) override
Definition
FNeg.h:23
mini_llvm::ir::InstructionVisitor
Definition
InstructionVisitor.h:58
mini_llvm::ir::InstructionVisitor::visitFNeg
virtual void visitFNeg(FNeg &I)
Definition
InstructionVisitor.h:82
mini_llvm::ir::UnaryFloatingArithmeticOperator::UnaryFloatingArithmeticOperator
UnaryFloatingArithmeticOperator(std::shared_ptr< Value > op)
Definition
UnaryFloatingArithmeticOperator.h:22
mini_llvm::ir::UnaryFloatingOperator::value
auto & value(this Self &&self)
Definition
UnaryFloatingOperator.h:19
Constant.h
InstructionVisitor.h
mini_llvm::ir
Definition
Argument.h:13
include
mini-llvm
ir
Instruction
FNeg.h
Generated by
1.17.0