[llvm-dev] Migration help required for 3.3 to 3.8

edA-qa mort-ora-y via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 5 09:40:46 PDT 2016


On 05/06/16 17:37, Tim Northover wrote:
> This is part of an in-progress move to untyped pointers. if you're
> executing a gep on "type*", the type that'll be needed is "type".
> Which is probably "valuePtr->getType()->getElementType()" in your case. 

To confirm, the type parameter for CreateStructGEP is the resulting
type, not the source structure type?

> The pass manager you're used to has been renamed "LegacyPassManager"
> as we're working on a new implementation (templated, as you see). For
> the initial migration it's best to just use LegacyPassManager. 

One related issue, I used to add the DataLayout to the pass manager like
this:
    fpm.add( new llvm::DataLayout( ee->getDataLayout() ) );

Where `ee` is the ExecutionEngine. Is there a replacement to setting the
DataLayout -- note I'm just using defaults for all data layouts now, so
I don't need to set this if it's implied now.

> Because EngineBuilder takes ownership of the module and deletes it
> afterwards. It's still fine to keep your own pointer to the Module. 

Should there not be a `getModule` function on the EngineBuilder (and
Linker) in this case? To me passing a `unique_ptr` kind of implies I've
given up all control of my original pointer. Using my own copy past that
point feels like an error.


Thanks for the answers.

-- 
edA-qa mort-ora-y 
http://mortoray.com/

Leaf - the language we always wanted
http://leaflang.org/




More information about the llvm-dev mailing list