Lines Matching refs:Function
123 /// CallExprAST - Expression class for function calls.
133 /// PrototypeAST - This class represents the "prototype" for a function,
135 /// of arguments the function takes).
143 Function *Codegen();
146 /// FunctionAST - This class represents a function definition itself.
154 Function *Codegen();
304 return ErrorP("Expected function name in prototype");
367 // Look this variable up in the function.
392 Function *CalleeF = TheModule->getFunction(Callee);
394 return ErrorV("Unknown function referenced");
409 Function *PrototypeAST::Codegen() {
410 // Make the function type: double(double,double) etc.
416 Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule);
427 ErrorF("redefinition of function");
433 ErrorF("redefinition of function with different # args");
440 for (Function::arg_iterator AI = F->arg_begin(); Idx != Args.size();
451 Function *FunctionAST::Codegen() {
454 Function *TheFunction = Proto->Codegen();
463 // Finish off the function.
469 // Optimize the function.
475 // Error reading body, remove function.
488 if (Function *LF = F->Codegen()) {
489 fprintf(stderr, "Read function definition:");
500 if (Function *F = P->Codegen()) {
511 // Evaluate a top-level expression into an anonymous function.
513 if (Function *LF = F->Codegen()) {
514 // JIT the function, returning a function pointer.
518 // can call it as a native function.