Code Listener  [unstable] git snapshot
Public Member Functions | Data Fields
Var Struct Reference

high-level variable representation More...

#include <storage.hh>

Collaboration diagram for Var:
Collaboration graph
[legend]

Public Member Functions

 Var ()
 dummy constructor More...
 
 ~Var ()
 
 Var (EVar code, const struct cl_operand *op)
 wrap low-level operand to Var object More...
 

Data Fields

EVar code
 high-level kind of variable More...
 
struct cl_loc loc
 location of its declaration More...
 
struct cl_typetype
 type of the variable More...
 
int uid
 unique ID of variable More...
 
std::string name
 name of the variable, empty string for anonymous variables More...
 
std::vector< const Insn * > initials
 initializer (optional) More...
 
bool initialized
 if true, the variable is initialized; in particular it means that whole contents of the variable is nullified unless said otherwise (and yes, even if initials is an empty list) More...
 
bool isExtern
 true if the variable is external (defined in another module) More...
 
bool mayBePointed
 true if there is at least one instruction in the program that takes an address of the variable (or some part of it) More...
 

Detailed Description

high-level variable representation

Definition at line 63 of file storage.hh.

Constructor & Destructor Documentation

Var ( )

dummy constructor

Note
known to be useful for internal purposes only
~Var ( )
Var ( EVar  code,
const struct cl_operand op 
)

wrap low-level operand to Var object

Parameters
codekind of variable
opPointer to low-level operand to be used for Var construction.

Field Documentation

EVar code

high-level kind of variable

Definition at line 64 of file storage.hh.

bool initialized

if true, the variable is initialized; in particular it means that whole contents of the variable is nullified unless said otherwise (and yes, even if initials is an empty list)

Todo:
a better API for initializers?

Definition at line 96 of file storage.hh.

std::vector<const Insn *> initials

initializer (optional)

Definition at line 87 of file storage.hh.

bool isExtern

true if the variable is external (defined in another module)

Definition at line 101 of file storage.hh.

struct cl_loc loc

location of its declaration

Definition at line 65 of file storage.hh.

bool mayBePointed

true if there is at least one instruction in the program that takes an address of the variable (or some part of it)

Definition at line 107 of file storage.hh.

std::string name

name of the variable, empty string for anonymous variables

Definition at line 82 of file storage.hh.

struct cl_type* type

type of the variable

Note
This often differs from type of the operand given to constructor!

Definition at line 71 of file storage.hh.

int uid

unique ID of variable

Attention
not guaranteed to be unique beyond the scope of variable

Definition at line 77 of file storage.hh.


The documentation for this struct was generated from the following file: