int main(int argc, char **argv) { int r; setlocale(LC_ALL, ""); parse_opts(argc, argv); aug = aug_init(root, loadpath, flags|AUG_NO_ERR_CLOSE); if (aug == NULL || aug_error(aug) != AUG_NOERROR) { fprintf(stderr, "Failed to initialize Augeas\n"); if (aug != NULL) print_aug_error(); exit(EXIT_FAILURE); } add_transforms(transforms, transformslen); if (print_version) { print_version_info(); return EXIT_SUCCESS; } readline_init(); if (optind < argc) { // Accept one command from the command line r = run_args(argc - optind, argv+optind); } else { r = main_loop(); } if (history_file != NULL) write_history(history_file); return r == 0 ? EXIT_SUCCESS : EXIT_FAILURE; }
void function::operator()() { std::vector< llvm::GenericValue > run_args( 0 ); if( entry_point->getFunctionType()->getNumParams() != 0 ) throw InvalidArgument(); llvm::GenericValue Result = engine->runFunction( entry_point, run_args ); }