<div dir="ltr"><div>The erlang was a typo, I was trying things out.</div><div><br></div><div>I've updated the bug with a C program, which exhibits the problem.</div><div><br></div><div>To answer your question, given the IR you generated llc/opt does not complain.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 31, 2015 at 9:59 PM, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span>
<div>On 03/31/2015 09:52 PM, Philip Reames
wrote:<br>
</div>
<blockquote type="cite">
<br>
<blockquote type="cite">
<div dir="ltr">
<div>Maybe it is because I'm using a package that makes an
LLVM DLL for Windows.</div>
<div><br>
</div>
<div>The only reason why it show that error is if the static
constructor for it didn't run, right? And I don't know why
it would not run.</div>
</div>
</blockquote>
I need to take a closer look at your bug report before I can
really comment. </blockquote></span>
Ok, I took a look. Its hard for me to tell much from your report.
I don't have Visual Studios (or Windows for that matter) and can't
easily reproduce. <br>
<br>
It would really help to know if this is a problem with the C
bindings or the generated IR. If you manually create the expected
IR and run it through opt/llc, does that work?<br>
<br>
Can you include the full output of this example? Both the IR and
the error would be useful to see. <br>
<br>
One observation, it looks like you're using the erlang GC not shadow
stack? e.g. <br>
LLVM.SetGC(sum, "erlang");<br>
<br>
Philip<br>
<br>
</div>
</blockquote></div><br></div>