GPUOcelot
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

ir::LLVMStatement Class Reference

A class for LLVM declarations. More...

#include <LLVMStatement.h>

Collaboration diagram for ir::LLVMStatement:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Type {
  Instruction, Label, FunctionDefinition, FunctionDeclaration,
  TypeDeclaration, VariableDeclaration, BeginFunctionBody, EndFunctionBody,
  NewLine, InvalidType
}
 

The type of statement.

More...
enum  Linkage {
  Private, LinkerPrivate, Internal, AvailableExternally,
  External, LinkOnce, Weak, Common,
  Appending, ExternWeak, LinkOnceOdr, WeakOdr,
  ExternallyVisible, DllImport, DllExport, InvalidLinkage
}
 

An llvm linkage type.

More...
enum  Visibility { Default, Hidden, Protected, InvalidVisibility }
 

An llvm visibility type.

More...

Public Member Functions

 LLVMStatement (Type type=InvalidType, const LLVMInstruction *i=0)
 Sets out the instruction pointer and sets the type.
 LLVMStatement (const LLVMInstruction &i)
 Construct a statement from an instruction.
 LLVMStatement (const std::string &l)
 Construction a statement from a label.
 LLVMStatement (const LLVMStatement &s)
 Copy constructor for instruction.
 ~LLVMStatement ()
 Possibly cleans up the instruction pointer.
const LLVMStatementoperator= (const LLVMStatement &s)
 Assignment operator for instruction.
std::string toString () const
 Convert this statement into a string.

Static Public Member Functions

static std::string toString (Linkage linkage)
static std::string toString (Visibility visibility)

Public Attributes

LLVMInstructioninstruction
Type type
 The type of statement.
std::string label
 The string if this is a label.
Linkage linkage
 The linkage type if this is a declaration.
LLVMInstruction::CallingConvention convention
 The calling convention if this is a function.
Visibility visibility
 The visibility if this is a declaration.
LLVMInstruction::Operand operand
 The operand if this is a variable declaration or the returned type of a function call.
LLVMInstruction::ParameterAttribute returnAttribute
 The return attribute if this is a function declaration.
LLVMI32 functionAttributes
 The attributes if this is a function delcaration.
std::string section
 The section that this is delcared in.
LLVMI32 alignment
 The alignment if this is a declaration.
LLVMInstruction::ParameterVector parameters
 The set of parameter types if this is a function.
LLVMI32 space
 The address space if this is a variable.
LLVMI1 constant
 Is this variable constant?

Detailed Description

A class for LLVM declarations.


Member Enumeration Documentation

An llvm linkage type.

Enumerator:
Private 
LinkerPrivate 
Internal 
AvailableExternally 
External 
LinkOnce 
Weak 
Common 
Appending 
ExternWeak 
LinkOnceOdr 
WeakOdr 
ExternallyVisible 
DllImport 
DllExport 
InvalidLinkage 

The type of statement.

Enumerator:
Instruction 
Label 
FunctionDefinition 
FunctionDeclaration 
TypeDeclaration 
VariableDeclaration 
BeginFunctionBody 
EndFunctionBody 
NewLine 
InvalidType 

An llvm visibility type.

Enumerator:
Default 
Hidden 
Protected 
InvalidVisibility 

Constructor & Destructor Documentation

ir::LLVMStatement::LLVMStatement ( Type  type = InvalidType,
const LLVMInstruction i = 0 
)

Sets out the instruction pointer and sets the type.

ir::LLVMStatement::LLVMStatement ( const LLVMInstruction i) [explicit]

Construct a statement from an instruction.

ir::LLVMStatement::LLVMStatement ( const std::string &  l) [explicit]

Construction a statement from a label.

ir::LLVMStatement::LLVMStatement ( const LLVMStatement s)

Copy constructor for instruction.

ir::LLVMStatement::~LLVMStatement ( )

Possibly cleans up the instruction pointer.


Member Function Documentation

const LLVMStatement & ir::LLVMStatement::operator= ( const LLVMStatement s)

Assignment operator for instruction.

std::string ir::LLVMStatement::toString ( ) const

Convert this statement into a string.

std::string ir::LLVMStatement::toString ( Linkage  linkage) [static]
std::string ir::LLVMStatement::toString ( Visibility  visibility) [static]

Member Data Documentation

The alignment if this is a declaration.

Is this variable constant?

The calling convention if this is a function.

The attributes if this is a function delcaration.

If this is an instruction, a pointer to the instruction object.

The pointer is owned by this class.

The string if this is a label.

The linkage type if this is a declaration.

The operand if this is a variable declaration or the returned type of a function call.

The set of parameter types if this is a function.

The return attribute if this is a function declaration.

The section that this is delcared in.

The address space if this is a variable.

The type of statement.

The visibility if this is a declaration.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines