Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::LlvmCodeGen::FnPrototype Class Reference

#include <llvm-codegen.h>

Collaboration diagram for impala::LlvmCodeGen::FnPrototype:

Public Member Functions

 FnPrototype (LlvmCodeGen *, const std::string &name, llvm::Type *ret_type)
 
const std::string & name () const
 Returns name of function. More...
 
void AddArgument (const NamedVariable &var)
 Add argument. More...
 
llvm::Function * GeneratePrototype (LlvmBuilder *builder=NULL, llvm::Value **params=NULL)
 

Private Attributes

LlvmCodeGencodegen_
 
std::string name_
 
llvm::Type * ret_type_
 
std::vector< NamedVariableargs_
 

Friends

class LlvmCodeGen
 

Detailed Description

Abstraction over function prototypes. Contains helpers to build prototypes and generate IR for the types.

Definition at line 161 of file llvm-codegen.h.

Constructor & Destructor Documentation

impala::LlvmCodeGen::FnPrototype::FnPrototype ( LlvmCodeGen ,
const std::string &  name,
llvm::Type *  ret_type 
)

Create a function prototype object, specifying the name of the function and the return type.

Definition at line 454 of file llvm-codegen.cc.

References codegen_, and impala::LlvmCodeGen::is_compiled_.

Member Function Documentation

Function * impala::LlvmCodeGen::FnPrototype::GeneratePrototype ( LlvmBuilder builder = NULL,
llvm::Value **  params = NULL 
)

Generate LLVM function prototype. If a non-null builder is passed, this function will also create the entry block and set the builder's insert point to there. If params is non-null, this function will also return the arguments values (params[0] is the first arg, etc). In that case, params should be preallocated to be number of arguments

Definition at line 460 of file llvm-codegen.cc.

References gen_ir_descriptions::idx.

Referenced by impala::CodegenInnerLoop(), impala::LlvmCodeGen::CodegenMinMax(), impala::Expr::CreateIrFunctionPrototype(), and impala::LlvmCodeGen::GetLibCFunction().

const std::string& impala::LlvmCodeGen::FnPrototype::name ( ) const
inline

Returns name of function.

Definition at line 168 of file llvm-codegen.h.

References name_.

Referenced by impala::LlvmCodeGen::GetLibCFunction().

Friends And Related Function Documentation

friend class LlvmCodeGen
friend

Definition at line 185 of file llvm-codegen.h.

Member Data Documentation

std::vector<NamedVariable> impala::LlvmCodeGen::FnPrototype::args_
private

Definition at line 190 of file llvm-codegen.h.

Referenced by AddArgument().

LlvmCodeGen* impala::LlvmCodeGen::FnPrototype::codegen_
private

Definition at line 187 of file llvm-codegen.h.

Referenced by FnPrototype().

std::string impala::LlvmCodeGen::FnPrototype::name_
private

Definition at line 188 of file llvm-codegen.h.

Referenced by name().

llvm::Type* impala::LlvmCodeGen::FnPrototype::ret_type_
private

Definition at line 189 of file llvm-codegen.h.


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