Thanks for sharing that with me. I'm not setting any data layout, so it has to be the default one. <div><br></div><div>Neil, do you know the behavior you described is on LLVM 3.7?</div><div><br></div><div>So it look that the problem I have is somewhere else. That means I would need LLVM with debug symbols...<br><br><div class="gmail_quote"><div dir="ltr">On Thu, May 5, 2016, 14:51 Neil Henning via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Another approach that we use - we just wipe the DataLayout on the
module about to be handed to the ExecutionEngine, and in MCJIT.cpp
there is a line that says 'if datalayout isDefault() (eg. empty
string representation "") set it to the datalayout of the Target
Machine'.<br>
<br>
Cheers,<br>
<br>
-Neil.</div><div text="#000000" bgcolor="#FFFFFF"><br>
<br>
<div>On 05/05/16 13:48, Josh Klontz via
llvm-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Pawel,
<div><br>
</div>
<div>Hopefully this provides a partial answer: when using MCJIT
I set the data layout for every module. My code looks roughly
like:</div>
<div><br>
</div>
<div>
TargetRegistry::lookupTarget(sys::getProcessTriple())-><span style="color:rgb(0,0,0)">createTargetMachine</span><span style="color:rgb(0,0,0)">()-></span>createDataLayout<span style="color:rgb(0,0,0)">();</span><br>
</div>
<div><span style="color:rgb(0,0,0)"><br>
</span></div>
<div><span style="color:rgb(0,0,0)">-Josh</span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, May 5, 2016 at 5:34 AM, Paweł
Bylica <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi everyone,
<div><br>
</div>
<div>I was happily using MCJIT for over a year until
yesterday when I created a function call with an
argument of a struct type. That caused a crash in
SelectionDAG around DataLayout::getAlignment().</div>
<div><br>
</div>
<div>I remember the noise about the DataLayout started
being mandatory. But I cannot find precise information.</div>
<div><br>
</div>
<div>Should I set the DataLayout in every Module created?</div>
<div><br>
</div>
<div>Where can I get the DataLayout for the host process
from?</div>
<div><br>
</div>
<div>Can a DataLayout instance be shared between modules?</div>
<span><font color="#888888">
<div><br>
</div>
<div>- Paweł</div>
</font></span></div>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>