[LLVMdev] Running a Local Buildbot

Vania Joloboff vania.joloboff at inria.fr
Tue Jan 29 00:26:49 PST 2013


Hello

We are migrating from 2.9 to 3.2

Here is some code that does not compile any more

     llvm::PassManager *pm;
     llvm::FunctionPassManager *fpm;


     module = llvm::ParseBitcodeFile(mb,context,&err_str);
     if (!module) {
       error() <<"Failed to load module from bitcode file: " <<err_str 
<<endl;
       exit(1);
     }
     pm = new PassManager();
     pm->add(createAlwaysInlinerPass());

     fpm = new FunctionPassManager(module);
     fpm->add(new TargetData(module));
     fpm->add(createGVNPass());
     fpm->add(createInstructionCombiningPass());
     fpm->add(createDeadCodeEliminationPass());
     fpm->add(createCFGSimplificationPass());
     fpm->add(createDeadStoreEliminationPass());

     InitializeNativeTarget();
     atexit(llvm_shutdown);
     EngineBuilder builder(module);

We have problems because TargetData does not seem to exist anymore.
Where is the documentation describing the changes regarding TargetData
and what we should do now ?

I did not see anything in 3.0 Release Notes in that regard

Thanks for your help
Vania





More information about the llvm-dev mailing list