[LLVMdev] strange behaviour after extracting optimization pass code

Duncan Sands baldrick at free.fr
Fri Dec 19 09:53:04 CST 2008


Hi,

> void optimizeFunction(std::string functionName, llvm::Module* mod) {
>     llvm::Function* f = mod->getFunction(functionName);
> 
>     llvm::ExistingModuleProvider mp(mod);
>     llvm::FunctionPassManager fpm(&mp);

maybe when you leave this function the above two objects are
being finalized and freeing memory?

Ciao,

Duncan.


More information about the LLVMdev mailing list