<div dir="ltr">Could it be possible to have a feedback, even negative, please ?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 5 August 2012 14:44, Maël Nison <span dir="ltr"><<a href="mailto:nison.mael@gmail.com" target="_blank">nison.mael@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As a workaround, creating a temporary stack-alloced Module to use its getTypeByName() method works.<div><br></div><div>

But that's a workaround, it requires useless additional instructions. : /<div><div class="h5"><br><div><div><div><div><br>


</div><div><div class="gmail_quote">On 2 August 2012 18:40, Maël Nison <span dir="ltr"><<a href="mailto:nison.mael@gmail.com" target="_blank">nison.mael@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





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><span><font color="#888888"><div>





<div><br></div>-- <br>
Maël Nison<br>Epitech 2014, Paris - Astek<br><br>
</div>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Maël Nison<br>Epitech 2014, Paris - Astek<br><br>
</div></div></div></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Maël Nison<br>JS Github hipster, Assistant C++ chez Epitech<br>
</div>