Home | History | Annotate | Download | only in CppBackend

Lines Matching refs:Function

41 FuncName("cppfname", cl::desc("Specify the name of the generated function"),
42 cl::value_desc("function name"));
62 clEnumValN(GenFunction, "function", "Generate a function definition"),
63 clEnumValN(GenFunctions,"functions", "Generate all function definitions"),
64 clEnumValN(GenInline, "inline", "Generate an inline function"),
153 void printFunctionUses(const Function *F);
154 void printFunctionHead(const Function *F);
155 void printFunctionBody(const Function *F);
399 } else if (isa<Function>(val)) {
406 Function::const_arg_iterator(Arg)) + 1;
649 // Add all the function arguments
650 for (Function::const_arg_iterator AI = FI->arg_begin(),
656 for (Function::const_iterator BB = FI->begin(),
672 // First, if the constant is actually a GlobalValue (variable or function)
894 for (Function::const_iterator BB = FI->begin(),
915 if (const Function *F = dyn_cast<Function>(Init)) {
916 nl(Out)<< "/ Function Declarations"; nl(Out);
1019 // printInstruction - This member is called for each Instruction in a function.
1456 // Print out the types, constants and declarations needed by one function
1457 void CppWriter::printFunctionUses(const Function* F) {
1460 // Print the function's return type
1463 // Print the function's function type
1466 // Print the types of each of the function's arguments
1467 for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
1477 for (Function::const_iterator BB = F->begin(), BE = F->end();
1515 // Print the function declarations for any functions encountered
1516 nl(Out) << "// Function Declarations"; nl(Out);
1519 if (Function* Fun = dyn_cast<Function>(*I)) {
1553 void CppWriter::printFunctionHead(const Function* F) {
1554 nl(Out) << "Function* " << getCppName(F);
1561 Out<< " = Function::Create(";
1605 void CppWriter::printFunctionBody(const Function *F) {
1610 // cross-function forward refs
1617 Out << "Function::arg_iterator args = " << getCppName(F)
1621 for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
1634 for (Function::const_iterator BI = F->begin(), BE = F->end();
1645 // Output all of its basic blocks... for the function
1646 for (Function::const_iterator BI = F->begin(), BE = F->end();
1677 const Function* F = TheModule->getFunction(func);
1679 error(std::string("Function '") + func + "' not found in input module");
1683 error(std::string("Function '") + func + "' is external!");
1686 nl(Out) << "BasicBlock* " << fname << "(Module* mod, Function *"
1689 for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
1710 // define all the functions first before emitting their function bodies.
1711 nl(Out) << "// Function Declarations"; nl(Out);
1739 // Finally, we can safely put out all of the function bodies.
1740 nl(Out) << "// Function Definitions"; nl(Out);
1744 nl(Out) << "// Function: " << I->getName() << " (" << getCppName(I)
1762 Out << "#include <llvm/Function.h>\n";
1837 const Function* F = TheModule->getFunction(funcName);
1839 error(std::string("Function '") + funcName + "' not found in input module");
1856 const Function &func = *I;
1900 // Get the name of the function we're supposed to generate
1916 error("You must use the -for option with -gen-{function,variable,type}");