retdec
Public Member Functions | Private Attributes | List of all members
retdec::common::Type Class Reference

#include <type.h>

Collaboration diagram for retdec::common::Type:
Collaboration graph
[legend]

Public Member Functions

 Type ()
 
 Type (const std::string &llvmIrRepre)
 
bool operator< (const Type &val) const
 
bool operator== (const Type &val) const
 
Type query methods.
bool isDefined () const
 
bool isWideString () const
 
Type set methods.
void setLlvmIr (const std::string &t)
 
void setIsWideString (bool b)
 
Type get methods.
std::string getId () const
 
std::string getLlvmIr () const
 

Private Attributes

std::string _llvmIr = "i32"
 
bool _wideString = false
 

Detailed Description

Represents data type.

Type's LLVM IR representation is its unique ID.

Constructor & Destructor Documentation

◆ Type() [1/2]

retdec::common::Type::Type ( )

Default type is i32.

◆ Type() [2/2]

retdec::common::Type::Type ( const std::string &  llvmIrRepre)

Member Function Documentation

◆ getId()

std::string retdec::common::Type::getId ( ) const
Returns
Type's ID is its LLVM IR representation.

◆ getLlvmIr()

std::string retdec::common::Type::getLlvmIr ( ) const
Returns
LLVM IR string representation (unique ID).

◆ isDefined()

bool retdec::common::Type::isDefined ( ) const
Returns
Type is defined if llvmIr member is not empty.

◆ isWideString()

bool retdec::common::Type::isWideString ( ) const

Wide strings are in LLVM IR represented as int arrays. This flag can be use to distinguish them from ordinary int arrays.

◆ operator<()

bool retdec::common::Type::operator< ( const Type val) const

Less-than comparison of this instance with the provided one. Default string comparison of llvmIr members is used.

Parameters
valOther type to compare with.
Returns
True if this instance is considered to be less-than val.

◆ operator==()

bool retdec::common::Type::operator== ( const Type val) const

Types are equal if their llvm ir representations are equal.

◆ setIsWideString()

void retdec::common::Type::setIsWideString ( bool  b)

◆ setLlvmIr()

void retdec::common::Type::setLlvmIr ( const std::string &  t)

Member Data Documentation

◆ _llvmIr

std::string retdec::common::Type::_llvmIr = "i32"
private

LLVM IR string representation. Unique ID.

◆ _wideString

bool retdec::common::Type::_wideString = false
private

Wide strings are in LLVM IR represented as int arrays. This flag can be use to distinguish them from ordinary int arrays.


The documentation for this class was generated from the following files: