search for: pm_builder

Displaying 1 result from an estimated 1 matches for "pm_builder".

2017 Mar 31
2
How to write the same things as `opt` command in C++ API
...entrypoint: ret i32 undef } attributes #0 = { norecurse nounwind readnone } [C++ code] /// @brief context llvm::LLVMContext context; /// @brief module std::unique_ptr<llvm::Module> module = llvm::make_unique<llvm::Module>("my module", context); llvm::PassManagerBuilder pm_builder; llvm::legacy::PassManager pm; pm_builder.Inliner = llvm::createFunctionInliningPass(); pm_builder.populateModulePassManager(pm); /// @brief Create function type (void) => i32 llvm::FunctionType *commonfuncType = llvm::FunctionType::get(llvm::Type::getInt32Ty(context), {}, false); //...