retdec
trunc_cast_expr.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_IR_TRUNC_CAST_EXPR_H
8 #define RETDEC_LLVMIR2HLL_IR_TRUNC_CAST_EXPR_H
9 
13 
14 namespace retdec {
15 namespace llvmir2hll {
16 
17 class Expression;
18 class Visitor;
19 
26 class TruncCastExpr final: public CastExpr {
27 public:
29 
30  virtual bool isEqualTo(ShPtr<Value> otherValue) const override;
31  virtual ShPtr<Value> clone() override;
32 
35  virtual void accept(Visitor *v) override;
37 
38 private:
39  // Since instances are created by calling the static function create(), the
40  // constructor can be private.
42 };
43 
44 } // namespace llvmir2hll
45 } // namespace retdec
46 
47 #endif
Base class for cast instructions.
Base class for cast instructions.
Definition: cast_expr.h:25
ShPtr< Expression > op
Operand.
Definition: cast_expr.h:45
ShPtr< Type > dstType
Destination type.
Definition: cast_expr.h:48
Cast of LLVM instructions FPTrunc/Trunc.
Definition: trunc_cast_expr.h:26
virtual void accept(Visitor *v) override
Visitor pattern implementation.
Definition: trunc_cast_expr.cpp:63
TruncCastExpr(ShPtr< Expression > op, ShPtr< Type > dstType)
Constructs a cast operator of LLVM instructions FPTrunc/Trunc.
Definition: trunc_cast_expr.cpp:19
virtual ShPtr< Value > clone() override
Clones the cast operator.
Definition: trunc_cast_expr.cpp:34
static ShPtr< TruncCastExpr > create(ShPtr< Expression > op, ShPtr< Type > dstType)
Creates a new cast operator of LLVM instructions FPTrunc/Trunc.
Definition: trunc_cast_expr.cpp:50
virtual bool isEqualTo(ShPtr< Value > otherValue) const override
Returns true if this value is equal to otherValue, false otherwise.
Definition: trunc_cast_expr.cpp:22
A base class of all visitors.
Definition: visitor.h:95
A base class of all types.
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
Declarations, aliases, macros, etc. for the use of smart pointers.