HLVM API Documentation

Variable Class Reference

AST Variable Node. More...

#include <Linkables.h>

Inheritance diagram for Variable:

Inheritance graph
[legend]
List of all members.

Accessors

Public Member Functions

Mutators

Protected Member Functions

Constructors

Protected Attributes

Data

Friends


Detailed Description

AST Variable Node.

This class provides an Abstract Syntax Tree node that represents a global Variable. A Variable can only be declared as a component of a Bundle. It is visible throughout the Bundle that declares it and may be a candidate for linkage with other Bundles. A Variable is a storage location, with an address, of a specific type. Global variables may have a constant value in which case HLVM will ensure that the value of the global variable is immutable. Variables can be of any type.

See also:
Linkable

Bundle

Definition at line 102 of file Linkables.h.


Constructor & Destructor Documentation

Variable  )  [inline, protected]
 

Definition at line 107 of file Linkables.h.

~Variable  )  [protected, virtual]
 

Definition at line 40 of file Linkables.cpp.


Member Function Documentation

static bool classof const Node N  )  [inline, static]
 

Provide support for isa<X> and friends.

Reimplemented from Linkable.

Definition at line 119 of file Linkables.h.

References Node::is(), and hlvm::VariableID.

static bool classof const Variable  )  [inline, static]
 

Definition at line 118 of file Linkables.h.

Constant* getInitializer  )  const [inline]
 

Definition at line 115 of file Linkables.h.

References Variable::init.

bool hasInitializer  )  const [inline]
 

Definition at line 116 of file Linkables.h.

References Variable::init.

bool isConstant  )  const [inline]
 

Determine if the node is one of the Constant values.

Reimplemented from Node.

Definition at line 114 of file Linkables.h.

References Node::flags.

bool isZeroInitialized  )  const [inline]
 

Definition at line 117 of file Linkables.h.

References Variable::init.

void setInitializer Constant C  )  [inline]
 

Definition at line 126 of file Linkables.h.

References Variable::init.

void setIsConstant bool  v  )  [inline]
 

Definition at line 125 of file Linkables.h.

References Node::flags.


Friends And Related Function Documentation

friend class AST [friend]
 

Reimplemented from Linkable.

Definition at line 134 of file Linkables.h.


Member Data Documentation

Constant* init [protected]
 

Definition at line 132 of file Linkables.h.


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