mini-llvm 0.1.0
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
12#include "mini-llvm/ir/Value.h"
14
15namespace mini_llvm::ir {
16
18public:
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
#define MINI_LLVM_EXPORT
Definition Compiler.h:17
std::unique_ptr< Value > clone() const override
void accept(InstructionVisitor &visitor) const override
Definition FNeg.h:27
std::string format() const override
std::shared_ptr< Constant > fold() const override
FNeg(std::shared_ptr< Value > value)
Definition FNeg.h:19
void accept(InstructionVisitor &visitor) override
Definition FNeg.h:23
Definition InstructionVisitor.h:58
virtual void visitFNeg(FNeg &I)
Definition InstructionVisitor.h:82
UnaryFloatingArithmeticOperator(std::shared_ptr< Value > op)
Definition UnaryFloatingArithmeticOperator.h:22
auto & value(this Self &&self)
Definition UnaryFloatingOperator.h:19
Definition Argument.h:13