retdec
unreachable_stmt.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_IR_UNREACHABLE_STMT_H
8 #define RETDEC_LLVMIR2HLL_IR_UNREACHABLE_STMT_H
9 
11 
12 namespace retdec {
13 namespace llvmir2hll {
14 
15 class Visitor;
16 
22 class UnreachableStmt: public Statement {
23 public:
25 
26  virtual ShPtr<Value> clone() override;
27  virtual bool isEqualTo(ShPtr<Value> otherValue) const override;
28  virtual bool isCompound() override { return false; }
29  virtual void replace(ShPtr<Expression> oldExpr, ShPtr<Expression> newExpr) override;
30  virtual ShPtr<Expression> asExpression() const override;
31 
34  virtual void accept(Visitor *v) override;
36 
37 private:
39 };
40 
41 } // namespace llvmir2hll
42 } // namespace retdec
43 
44 #endif
Definition: address.h:21
static const uint64_t Undefined
Definition: address.h:47
A representation of a program statement.
Definition: statement.h:39
An unreachable statement.
Definition: unreachable_stmt.h:22
virtual ShPtr< Value > clone() override
Returns a clone of the value.
Definition: unreachable_stmt.cpp:19
static ShPtr< UnreachableStmt > create(Address a=Address::Undefined)
Definition: unreachable_stmt.cpp:42
virtual bool isCompound() override
Returns true if the statement is a compound statement, false otherwise.
Definition: unreachable_stmt.h:28
virtual ShPtr< Expression > asExpression() const override
Returns the statement as an expression.
Definition: unreachable_stmt.cpp:33
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: unreachable_stmt.cpp:38
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: unreachable_stmt.cpp:25
UnreachableStmt(Address a=Address::Undefined)
Constructs a new unreachable statement.
Definition: unreachable_stmt.cpp:17
virtual void replace(ShPtr< Expression > oldExpr, ShPtr< Expression > newExpr) override
Replaces all occurrences of oldExpr with newExpr in the current statement.
Definition: unreachable_stmt.cpp:29
A base class of all visitors.
Definition: visitor.h:95
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
A representation of a program statement.