Jlm
delta.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Nico Reißmann <nico.reissmann@gmail.com>
3  * See COPYING for terms of redistribution.
4  */
5 
7 #include <jlm/util/strfmt.hpp>
8 
9 namespace jlm::llvm
10 {
11 
12 DeltaOperation::~DeltaOperation() noexcept = default;
13 
14 std::string
15 DeltaOperation::debug_string() const
16 {
17  return util::strfmt("DELTA[", name(), "]");
18 }
19 
20 std::unique_ptr<rvsdg::Operation>
22 {
23  return std::make_unique<DeltaOperation>(*this);
24 }
25 
26 bool
27 DeltaOperation::operator==(const Operation & other) const noexcept
28 {
29  auto op = dynamic_cast<const DeltaOperation *>(&other);
30  return op && op->name_ == name_ && op->linkage_ == linkage_ && op->constant() == constant()
31  && op->Section_ == Section_ && *op->Type() == *Type();
32 }
33 
34 }
Delta operation.
Definition: delta.hpp:22
bool operator==(const Operation &other) const noexcept override
Definition: delta.cpp:27
std::unique_ptr< Operation > copy() const override
Definition: delta.cpp:21
~DeltaOperation() noexcept override
Global memory state passed between functions.
static std::string strfmt(Args... args)
Definition: strfmt.hpp:35