Home | History | Annotate | Download | only in ExceptionDemo

Lines Matching refs:Function

20 // regardless of whether or not that test function ignores or catches the
33 // thrown and caught by an inner generated test function.
35 // thrown and caught by an outer generated test function.
37 // thrown and NOT be caught by any generated function.
39 // caught by any generated function
201 /// Utility used to create a function, both declarations and definitions
203 /// @param retType function return type
204 /// @param theArgTypes function's ordered argument types
205 /// @param theArgNames function's ordered arguments needed if use of this
206 /// function corresponds to a function definition. Use empty
207 /// aggregate for function declarations.
208 /// @param functName function name
209 /// @param linkage function linkage
210 /// @param declarationOnly for function declarations
211 /// @param isVarArg function uses vararg arguments
212 /// @returns function instance
213 llvm::Function *createFunction(llvm::Module &module,
223 llvm::Function *ret =
224 llvm::Function::Create(functType, linkage, functName, &module);
230 for (llvm::Function::arg_iterator argIndex = ret->arg_begin();
243 /// the parent function. This is used for mutable variables etc.
244 /// @param function parent instance
249 static llvm::AllocaInst *createEntryBlockAlloca(llvm::Function &function,
253 llvm::BasicBlock &block = function.getEntryBlock();
339 /// This function is the struct _Unwind_Exception API mandated delete function
731 // Set Instruction Pointer to so we re-enter function
784 /// This is the personality function which is embedded (dwarf emitted), in the
821 // The real work of the personality function is captured here
874 llvm::Function *printFunct = module.getFunction("printStr");
902 /// string format, and a given print function.
906 /// @param printFunct function used to "print" integer
916 llvm::Function &printFunct,
947 /// parent function is simply exiting. In addition to printing some state
951 /// block). In addition this function creates the corresponding function's
956 /// @param toAddTo parent function to add block to
968 llvm::Function &toAddTo,
1035 /// @param toAddTo parent function to add block to
1044 llvm::Function &toAddTo,
1074 /// Generates a function which invokes a function (toInvoke) and, whose
1076 /// exceptionTypesToCatch argument. If the toInvoke function throws an
1080 /// normally exit if the toInvoke function does not throw an exception.
1082 /// the generated function exit.
1083 /// The generated function is returned after being verified.
1086 /// @param fpm a function pass manager holding optional IR to IR
1088 /// @param toInvoke inner function to invoke
1092 /// @returns generated function
1094 llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module,
1097 llvm::Function &toInvoke,
1103 llvm::Function *toPrint32Int = module.getFunction("print32Int");
1111 llvm::Function *ret = createFunction(module,
1116 llvm::Function::ExternalLinkage,
1206 llvm::Function *deleteOurException = module.getFunction("deleteOurException");
1208 // Note: function handles NULL exceptions
1236 llvm::Function *personality = module.getFunction("ourPersonality");
1346 /// Generates function which throws either an exception matched to a runtime
1347 /// determined type info type (argument to generated function), or if this
1352 /// @param fpm a function pass manager holding optional IR to IR
1357 /// @param nativeThrowFunct function which will throw a foreign exception
1358 /// if the above nativeThrowType matches generated function's arg.
1359 /// @returns generated function
1361 llvm::Function *createThrowExceptionFunction(llvm::Module &module,
1366 llvm::Function &nativeThrowFunct) {
1374 llvm::Function *ret = createFunction(module,
1379 llvm::Function::ExternalLinkage,
1411 llvm::Function *toPrint32Int = module.getFunction("print32Int");
1437 llvm::Function *createOurException = module.getFunction("createOurException");
1438 llvm::Function *raiseOurException = module.getFunction(
1460 /// test case. The test case consists of an outer function setup to invoke
1461 /// an inner function within an environment having multiple catch and single
1462 /// finally blocks. This inner function is also setup to invoke a throw
1463 /// function within an evironment similar in nature to the outer function's
1467 /// holds a type info type to throw that each function takes and passes it
1468 /// to the inner one if such a inner function exists. This type info type is
1469 /// looked at by the generated throw function to see whether or not it should
1471 /// a supplied a function which in turn will throw a foreign exception.
1474 /// @param fpm a function pass manager holding optional IR to IR
1476 /// @param nativeThrowFunctName name of external function which will throw
1478 /// @returns outermost generated test function.
1479 llvm::Function *createUnwindExceptionTest(llvm::Module &module,
1491 llvm::Function *nativeThrowFunct = module.getFunction(nativeThrowFunctName);
1493 // Create exception throw function using the value ~0 to cause
1495 llvm::Function *throwFunct = createThrowExceptionFunction(module,
1501 // Inner function will catch even type infos
1506 // Generate inner function.
1507 llvm::Function *innerCatchFunct = createCatchWrappedInvokeFunction(module,
1515 // Outer function will catch odd type infos
1520 // Generate outer function
1521 llvm::Function *outerCatchFunct = createCatchWrappedInvokeFunction(module,
1529 // Return outer function to run
1553 /// @param ignoreIt unused parameter that allows function to match implied
1554 /// generated function contract.
1563 /// function with a type info type to throw. Harness wraps the execution
1564 /// of generated function in a C++ try catch clause.
1565 /// @param engine execution engine to use for executing generated function.
1568 /// @param function generated test function to run
1573 llvm::Function *function,
1576 // Find test's function pointer
1579 reinterpret_cast<intptr_t>(engine->getPointerToFunction(function)));
1611 /// adds external function declarations to module.
1714 llvm::Function *funct = NULL;
1731 llvm::Function::ExternalLinkage,
1750 llvm::Function::ExternalLinkage,
1768 llvm::Function::ExternalLinkage,
1786 llvm::Function::ExternalLinkage,
1804 llvm::Function::ExternalLinkage,
1822 llvm::Function::ExternalLinkage,
1840 llvm::Function::ExternalLinkage,
1860 llvm::Function::ExternalLinkage,
1884 llvm::Function::ExternalLinkage,
1970 // Generate test code using function throwCppException(...) as
1971 // the function which throws foreign exceptions.
1972 llvm::Function *toRun =