Lines Matching refs:Function
152 /// CallExprAST - Expression class for function calls.
194 /// PrototypeAST - This class represents the "prototype" for a function,
216 Function *Codegen();
218 void CreateArgumentAllocas(Function *F);
221 /// FunctionAST - This class represents a function definition itself.
229 Function *Codegen();
522 return ErrorP("Expected function name in prototype");
614 /// the function. This is used for mutable variables etc.
615 static AllocaInst *CreateEntryBlockAlloca(Function *TheFunction,
628 // Look this variable up in the function.
640 Function *F = TheModule->getFunction(std::string("unary")+Opcode);
684 Function *F = TheModule->getFunction(std::string("binary")+Op);
693 Function *CalleeF = TheModule->getFunction(Callee);
695 return ErrorV("Unknown function referenced");
719 Function *TheFunction = Builder.GetInsertBlock()->getParent();
722 // end of the function.
782 Function *TheFunction = Builder.GetInsertBlock()->getParent();
863 Function *TheFunction = Builder.GetInsertBlock()->getParent();
906 Function *PrototypeAST::Codegen() {
907 // Make the function type: double(double,double) etc.
913 Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule);
924 ErrorF("redefinition of function");
930 ErrorF("redefinition of function with different # args");
937 for (Function::arg_iterator AI = F->arg_begin(); Idx != Args.size();
946 void PrototypeAST::CreateArgumentAllocas(Function *F) {
947 Function::arg_iterator AI = F->arg_begin();
960 Function *FunctionAST::Codegen() {
963 Function *TheFunction = Proto->Codegen();
979 // Finish off the function.
985 // Optimize the function.
991 // Error reading body, remove function.
1007 if (Function *LF = F->Codegen()) {
1008 fprintf(stderr, "Read function definition:");
1019 if (Function *F = P->Codegen()) {
1030 // Evaluate a top-level expression into an anonymous function.
1032 if (Function *LF = F->Codegen()) {
1033 // JIT the function, returning a function pointer.
1037 // can call it as a native function.