void FSPanel::CheckCB() { F83_RB->SetEnabled(GetISO9660()); F31_RB->SetEnabled(GetISO9660()); F37_RB->SetEnabled(GetISO9660()); Joliet_CB->SetEnabled(GetISO9660()); RockRidge_CB->SetEnabled(GetISO9660()); HFS_CB->SetEnabled(GetISO9660()); mappingCB->SetEnabled((HFS_CB->Value() == B_CONTROL_ON) && (HFS_CB->IsEnabled())); Looper()->PostMessage(JOLIET_CB_MSG, this); Looper()->PostMessage(ROCKRIDGE_CB_MSG, this); Looper()->PostMessage(MAPPING_CB_MSG, this); if (UDF_CB->IsEnabled()) { UDFDef_RB->SetEnabled(GetUDF()); UDFDVD_RB->SetEnabled(GetUDF()); } else { UDFDef_RB->SetEnabled(false); UDFDVD_RB->SetEnabled(false); } if (ISO9660_CB->Value() == B_CONTROL_OFF && UDF_CB->Value() == B_CONTROL_OFF && BFS_CB->Value() == B_CONTROL_OFF) { BFS_CB->SetValue(B_CONTROL_ON); CheckCB(); } }
llvm::Function *UDFHandler::RegisterExternalFunction( peloton::codegen::CodeGen &codegen, const expression::FunctionExpression &func_expr) { // The code_context associated with the UDF auto func_context = func_expr.GetFuncContext(); // Construct the new functionType in this context llvm::Type *llvm_ret_type = GetCodegenParamType(func_expr.GetValueType(), codegen); // vector of pair of <argument name, argument type> std::vector<llvm::Type *> llvm_args; auto args_type = func_expr.GetArgTypes(); auto iterator_arg_type = args_type.begin(); while (iterator_arg_type != args_type.end()) { llvm_args.push_back(GetCodegenParamType(*iterator_arg_type, codegen)); ++iterator_arg_type; } auto *fn_type = llvm::FunctionType::get(llvm_ret_type, llvm_args, false); // Construct the function prototype auto *func_ptr = llvm::Function::Create( fn_type, llvm::Function::ExternalLinkage, func_expr.GetFuncName(), &(codegen.GetCodeContext().GetModule())); // Register the Function Prototype in this context codegen.GetCodeContext().RegisterExternalFunction( func_ptr, func_context->GetRawFunctionPointer(func_context->GetUDF())); return func_ptr; }