retdec
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
retdec::bin2llvmir::Name Class Reference

#include <names.h>

Collaboration diagram for retdec::bin2llvmir::Name:
Collaboration graph
[legend]

Public Types

enum class  eType {
  HIGHEST_PRIORITY = 0 , CONFIG_FUNCTION , CONFIG_GLOBAL , CONFIG_SEGMENT ,
  DEBUG_FUNCTION , DEBUG_GLOBAL , LTI_FUNCTION , IMPORT ,
  EXPORT , SYMBOL_FUNCTION , SYMBOL_OBJECT , SYMBOL_FILE ,
  SYMBOL_OTHER , STATIC_CODE , ENTRY_POINT , SECTION ,
  IMPORT_GENERATED , LOWEST_PRIORITY , INVALID
}
 

Public Member Functions

 Name ()
 
 Name (Config *c, const std::string &name, eType type, Lti *lti=nullptr)
 
 operator std::string () const
 
 operator bool () const
 
bool operator< (const Name &o) const
 
const std::string & getName () const
 
eType getType () const
 

Private Member Functions

void fixPic32Mangling ()
 
void fixPostfix ()
 

Private Attributes

std::string _name
 
eType _type = eType::INVALID
 

Detailed Description

Representation of one name.

Member Enumeration Documentation

◆ eType

Name type and its priority. Lower number -> higher priority.

Enumerator
HIGHEST_PRIORITY 
CONFIG_FUNCTION 
CONFIG_GLOBAL 
CONFIG_SEGMENT 
DEBUG_FUNCTION 
DEBUG_GLOBAL 
LTI_FUNCTION 
IMPORT 
EXPORT 
SYMBOL_FUNCTION 
SYMBOL_OBJECT 
SYMBOL_FILE 
SYMBOL_OTHER 
STATIC_CODE 
ENTRY_POINT 
SECTION 
IMPORT_GENERATED 
LOWEST_PRIORITY 
INVALID 

Constructor & Destructor Documentation

◆ Name() [1/2]

retdec::bin2llvmir::Name::Name ( )

◆ Name() [2/2]

retdec::bin2llvmir::Name::Name ( Config c,
const std::string &  name,
eType  type,
Lti lti = nullptr 
)

Member Function Documentation

◆ fixPic32Mangling()

void retdec::bin2llvmir::Name::fixPic32Mangling ( )
private

◆ fixPostfix()

void retdec::bin2llvmir::Name::fixPostfix ( )
private

Remove name's postfix. TODO: This was done in fileformat, but was removed from there. Maybe we should do it only for some types of names (e.g. symbols). Probably we should not take care only of GLIBC, there might be more std postfixes (e.g. GLIBCXX), or any other postfixes (e.g. NSS). Maybe we should keep the postfix somewhere and let the user know this fix happened (e.g. add comment to name).

◆ getName()

const std::string & retdec::bin2llvmir::Name::getName ( ) const

◆ getType()

Name::eType retdec::bin2llvmir::Name::getType ( ) const

◆ operator bool()

retdec::bin2llvmir::Name::operator bool ( ) const
explicit

◆ operator std::string()

retdec::bin2llvmir::Name::operator std::string ( ) const

◆ operator<()

bool retdec::bin2llvmir::Name::operator< ( const Name o) const

Member Data Documentation

◆ _name

std::string retdec::bin2llvmir::Name::_name
private

◆ _type

eType retdec::bin2llvmir::Name::_type = eType::INVALID
private

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