<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 3/8/2017 3:44 PM, Toshiyasu Morita
      wrote:<br>
    </div>
    <blockquote
cite="mid:CA+f7SnfXgtOZBFxDq2SP8reLdHbiyEdtb8nDWti6SsgJDNNOAg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div><span class="gmail-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
            LLVMCreateMemoryBufferWithMemoryRange, not
            LLVMCreateMemoryBufferWithContentsOfFile...<br>
            <br>
          </div>
          Or do you mean I need to load the module into memory before
          calling LLVMGetBitcodeModuleInContext2?<br>
        </div>
      </div>
    </blockquote>
    <br>
    Yes, you need to load the module into memory first. 
    LLVMCreateMemoryBufferWithContentsOfFile will do that for you.<br>
    <br>
    -Eli<br>
    <pre class="moz-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>
  </body>
</html>