[LLVMdev] strange behaviour after extracting optimization pass code

Duncan Sands baldrick at free.fr
Fri Dec 19 07:53:04 PST 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 llvm-dev mailing list