<div dir="ltr"><span class="gmail-im"><blockquote type="cite"><div dir="ltr"><div>Or do you mean I need to load the module into memory before
calling LLVMGetBitcodeModuleInContext2<wbr>?<br>
</div>
</div>
</blockquote>
<br></span>
> Yes, you need to load the module into memory first.<br>> LLVMCreateMemoryBufferWithCont<wbr>entsOfFile will do that for you.<div class="gmail-yj6qo gmail-ajU"><div id="gmail-:z5" class="gmail-ajR" tabindex="0"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"><br></div><div id="gmail-:z5" class="gmail-ajR" tabindex="0">Thanks!<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 8, 2017 at 3:48 PM, Friedman, Eli <span dir="ltr"><<a href="mailto:efriedma@codeaurora.org" target="_blank">efriedma@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span class="">
<div class="m_3832703634050351426moz-cite-prefix">On 3/8/2017 3:44 PM, Toshiyasu Morita
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div><span class="m_3832703634050351426gmail-im">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
module_path = LLVMCreateMemoryBufferWithMemo<wbr>ryRange(path,
strlen(path), "path", 1);<br>
</blockquote>
<br>
</span>
LLVMCreateMemoryBufferWithCont<wbr>entsOfFile takes a
path.<br>
</div>
<br>
</div>
Erm...no...the code is calling
LLVMCreateMemoryBufferWithMemo<wbr>ryRange, not
LLVMCreateMemoryBufferWithCont<wbr>entsOfFile...<br>
<br>
</div>
Or do you mean I need to load the module into memory before
calling LLVMGetBitcodeModuleInContext2<wbr>?<br>
</div>
</div>
</blockquote>
<br></span>
Yes, you need to load the module into memory first.
LLVMCreateMemoryBufferWithCont<wbr>entsOfFile will do that for you.<span class=""><br>
<br>
-Eli<br>
<pre class="m_3832703634050351426moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
</span></div>
</blockquote></div><br></div>