<div dir="ltr">Thanks for pointing my misunderstanding of alignment issue.<div><br></div><div>Now I have import path issues.</div><div><br></div><div>When generating llvm ir from source does llvm require the import lib&#39;s too or just the import headers will be enough i.e I am assuming the linker phase come&#39;s after llvm-ir generation so header&#39;s are sufficient for generating llvm-ir or am I assuming it all wrong.</div><div><br></div><div>My input source file has one import statement of UIKit and my target triple is x86_64</div><div>I haven&#39;t set the sdk path<b>[ </b>no sdk available on the iOS device <b>]</b>, but copied all *.swiftmodule &amp; *.swiftdoc files along with the *.dylib for the target-tripple that I am trying to generate the llvm-ir for. I receive an <b>&lt;unknown&gt;:0: error: cannot load underlying module for &#39;CoreGraphics&#39;</b></div><div><br></div><div>The header path is set correctly and it indeed evaluated the import UIKit properly and CoreGraphics.swiftmodule is there in along with UIKit.swiftmodule.</div><div><b><br></b></div><div>*.modules are there under swift/iPhonesimulator/x86_64/</div><div>*.dylib are there under the swift/iPhonesimulator/</div><div>the swift path is properly set.</div><div><br></div><div>What am I missing here.</div><div><br></div><div>Thanks</div><div>Ramakrishna</div>







<div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 10:43 PM, Joe Groff <span dir="ltr">&lt;<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Mar 24, 2016, at 6:12 AM, Ramakrishna Mallireddy &lt;<a href="mailto:ramakrishna.malli@gmail.com">ramakrishna.malli@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; This may be due to the fact my native OSX being an 64bit architecture. Only a 64bit compiler build work on it properly.<br>
&gt; To make simulator i386 build works properly it may required native 32bit architecture OSX.<br>
&gt;<br>
&gt; Please correct me if I am wrong.<br>
<br>
</span>That shouldn&#39;t be a problem. The assertion indicates that the compiler thought that ProtocolDecl or ProtocolConformance are not sufficiently aligned to hold the tag bit necessary for llvm::PointerUnion in its low bits. You might be able to work around this by annotating ProtocolDecl and ProtocolConformance as explicitly having `alignof(8)`.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Joe<br>
<br>
</font></span></blockquote></div><br></div>