bool codegen_llvm_init() { LLVMLinkInMCJIT(); LLVMInitializeNativeTarget(); LLVMInitializeAllTargets(); LLVMInitializeAllTargetMCs(); LLVMInitializeAllTargetInfos(); LLVMInitializeAllAsmPrinters(); LLVMInitializeAllAsmParsers(); LLVMEnablePrettyStackTrace(); LLVMInstallFatalErrorHandler(fatal_error); LLVMPassRegistryRef passreg = LLVMGetGlobalPassRegistry(); LLVMInitializeCore(passreg); LLVMInitializeTransformUtils(passreg); LLVMInitializeScalarOpts(passreg); LLVMInitializeObjCARCOpts(passreg); LLVMInitializeVectorization(passreg); LLVMInitializeInstCombine(passreg); LLVMInitializeIPO(passreg); LLVMInitializeInstrumentation(passreg); LLVMInitializeAnalysis(passreg); LLVMInitializeIPA(passreg); LLVMInitializeCodeGen(passreg); LLVMInitializeTarget(passreg); return true; }
SWIGEXPORT void JNICALL Java_org_jllvm_bindings_InitializationJNI_LLVMInitializeCodeGen(JNIEnv *jenv, jclass jcls, jlong jarg1) { LLVMPassRegistryRef arg1 = (LLVMPassRegistryRef) 0 ; (void)jenv; (void)jcls; arg1 = *(LLVMPassRegistryRef *)&jarg1; LLVMInitializeCodeGen(arg1); }
bool codegen_init(pass_opt_t* opt) { LLVMInitializeNativeTarget(); LLVMInitializeAllTargets(); LLVMInitializeAllTargetMCs(); LLVMInitializeAllTargetInfos(); LLVMInitializeAllAsmPrinters(); LLVMInitializeAllAsmParsers(); LLVMEnablePrettyStackTrace(); LLVMInstallFatalErrorHandler(fatal_error); LLVMPassRegistryRef passreg = LLVMGetGlobalPassRegistry(); LLVMInitializeCore(passreg); LLVMInitializeTransformUtils(passreg); LLVMInitializeScalarOpts(passreg); LLVMInitializeObjCARCOpts(passreg); LLVMInitializeVectorization(passreg); LLVMInitializeInstCombine(passreg); LLVMInitializeIPO(passreg); LLVMInitializeInstrumentation(passreg); LLVMInitializeAnalysis(passreg); LLVMInitializeIPA(passreg); LLVMInitializeCodeGen(passreg); LLVMInitializeTarget(passreg); // Default triple, cpu and features. if(opt->triple != NULL) { opt->triple = LLVMCreateMessage(opt->triple); } else { #ifdef PLATFORM_IS_MACOSX // This is to prevent XCode 7+ from claiming OSX 14.5 is required. opt->triple = LLVMCreateMessage("x86_64-apple-macosx"); #else opt->triple = LLVMGetDefaultTargetTriple(); #endif } if(opt->cpu != NULL) opt->cpu = LLVMCreateMessage(opt->cpu); else opt->cpu = LLVMGetHostCPUName(); if(opt->features != NULL) opt->features = LLVMCreateMessage(opt->features); else opt->features = LLVMCreateMessage(""); return true; }
bool codegen_init(pass_opt_t* opt) { LLVMInitializeNativeTarget(); LLVMInitializeAllTargets(); LLVMInitializeAllTargetMCs(); LLVMInitializeAllAsmPrinters(); LLVMInitializeAllAsmParsers(); LLVMEnablePrettyStackTrace(); LLVMInstallFatalErrorHandler(fatal_error); LLVMPassRegistryRef passreg = LLVMGetGlobalPassRegistry(); LLVMInitializeCore(passreg); LLVMInitializeTransformUtils(passreg); LLVMInitializeScalarOpts(passreg); LLVMInitializeObjCARCOpts(passreg); LLVMInitializeVectorization(passreg); LLVMInitializeInstCombine(passreg); LLVMInitializeIPO(passreg); LLVMInitializeInstrumentation(passreg); LLVMInitializeAnalysis(passreg); LLVMInitializeIPA(passreg); LLVMInitializeCodeGen(passreg); LLVMInitializeTarget(passreg); // Default triple, cpu and features. if(opt->triple != NULL) opt->triple = LLVMCreateMessage(opt->triple); else opt->triple = LLVMGetDefaultTargetTriple(); if(opt->cpu != NULL) opt->cpu = LLVMCreateMessage(opt->cpu); else opt->cpu = LLVMGetHostCPUName(); if(opt->features != NULL) opt->features = LLVMCreateMessage(opt->features); else opt->features = LLVMCreateMessage(""); return true; }