Hi,<div><br></div><div>This very short patch moves Module's getTypeByName into LLVMContext, because :</div><div><br></div><div>- Every types are linked to a Context, so it makes sense to get types from the context and not from a module</div>
<div>- The Module::getTypeByName function doesn't actually use anything owned by the Module class</div><div>- It is not possible to specialize the TypeBuilder to return a named structure (we can only returns literal structures). By moving getTypeByName into the LLVMContext class, we are able to do it (TypeBuilder's specializations are called with a LLVMContext reference as parameter).</div>
<div><br></div><div>In order to keep backward compatibility, Module::getTypeByName now forwards to the new method.</div><div><br></div><div>It's my first patch so .. am I doing it wrong ?</div><div><div><br></div>-- <br>
Maël Nison<br>Epitech 2014, Paris - Astek<br><br>
</div>