Tthe IRBuilder APIs for unions or unions in general? Either way, I was using unions as a temporary solution for a problem I was too lazy to fully figure out anyway.<br><br><div class="gmail_quote">On Sun, Aug 15, 2010 at 4:54 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Alec Benzer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The dump from the function I'm running:<br>
<br>
define %object_structure @0() {<br>
entry:<br>
   ret %object_structure { i8 0, %object_union [double 5.000000e+00,<br>
double false] }<br>
}<br>
</blockquote>
<br></div>
Unions are almost entirely unimplemented. Sorry.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
the only output I get after the runFunction() call is:<br>
<br>
UNREACHABLE executed!<br>
Stack dump:<br>
0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@0'<br>
<br>
I just noticed that my union seems to look like an array....is that<br>
actually a union or do I have a problem somewhere? The code I use to<br>
generate the union is:<br>
<br>
llvm::Constant* tempUnion =<br>
llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t]));<br>
<br>
llvm::Value* goodUnion =<br>
builder.CreateInsertValue(tempUnion,data,t,"createuniontmp");<br>
<br>
object_union_type is union { double, i1 }, and (in this case) t is 0,<br>
and types[t] is double<br>
<br>
<br>
On Sun, Aug 15, 2010 at 4:13 PM, Eric Christopher <<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a><br></div><div class="im">
<mailto:<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>>> wrote:<br>
<br>
<br>
    On Aug 15, 2010, at 1:06 PM, Alec Benzer wrote:<br>
<br>
     > What does this error mean? I'm getting it from an<br>
    ExecutionEngine::runFunction() call. The function I'm passing it was<br>
    run through verifyFunction() right before the runFunction() call. I<br>
    can't seem to find anything that tells me what causes this, only<br>
    specific (but seemingly unrelated to my problem) cases of it happening.<br>
<br>
    Which unreachable was it?  The basic idea is that whichever section<br>
    of code gives that assertion shouldn't be executing.<br>
<br>
    Also, what was the .ll code that gave the assertion?<br>
<br>
    -eric<br>
<br>
<br>
<br>
<br></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote>
<br>
</blockquote></div><br>