<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">I found the problem with
      `getOrInsertFunction`. It's now using a C++ variadic template,
      thus I shouldn't provide the trailing null sentry. Changing to
      this works:<br>
      <br>
      <tt>    module->getOrInsertFunction(</tt><tt> "count_malloc",
        generic_ptr, f_natural_int );<br>
        <br>
      </tt>It looks like LLVM is being slowly C++ modernized, I do the
      same in my code over time. :)<br>
      <br>
      <br>
      On 17/03/18 07:48, edA-qa mort-ora-y via llvm-dev wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:83c913ab-a4e2-8244-e152-2af0885ba2d5@disemia.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <p>I'm encountering a few problems in my migration that I haven't
        yet figured out.</p>
      <p>`getOrInsertFunction` is generating a SEGFAULT at
        FunctionType::isValidArgumentType(llvm::Type*).  I'm calling it
        as:<br>
      </p>
      <p><tt>    generic_ptr_ = llvm::PointerType::get(
          llvm::Type::getInt8Ty(context), 0 );</tt><tt><br>
        </tt><tt>    f_natural_int = llvm::IntegerType::get(context,
          64);</tt><tt><br>
        </tt><tt>    module->getOrInsertFunction(</tt><tt><br>
        </tt><tt>        "count_malloc", generic_ptr, f_natural_int,
          (llvm::Type*)0 );</tt></p>
      <p><br>
      </p>
      <p>It appears there is no more Reloc::Default or
        CodeModel::Default, but the docs on those fields indicate there
        is still a target default. How do I get the default relocation
        and codeModel?</p>
      <p>I'm still using the legacy::PassManager. Is there a new way to
        do the passes now?<br>
      </p>
      <p>There docs still reference `tool_output_file<b>`</b>, but it
        appears the new name, in the header, is `ToolOutputFile`. <a
          class="moz-txt-link-freetext"
          href="https://llvm.org/doxygen/classllvm_1_1tool__output__file.html"
          moz-do-not-send="true">https://llvm.org/doxygen/classllvm_1_1tool__output__file.html</a><br>
      </p>
      <pre class="moz-signature" cols="72">-- 
edA-qa mort-ora-y  
        <a class="moz-txt-link-freetext" href="http://mortoray.com/" moz-do-not-send="true">http://mortoray.com/</a>

Creator of the Leaf language
        <a class="moz-txt-link-freetext" href="http://leaflang.org/" moz-do-not-send="true">http://leaflang.org/</a>

Streaming algorithms, AI, and design on Twitch
        <a class="moz-txt-link-freetext" href="https://www.twitch.tv/mortoray" moz-do-not-send="true">https://www.twitch.tv/mortoray</a>

Twitter
        edaqa
        </pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
edA-qa mort-ora-y  
        <a class="moz-txt-link-freetext" href="http://mortoray.com/">http://mortoray.com/</a>

Creator of the Leaf language
        <a class="moz-txt-link-freetext" href="http://leaflang.org/">http://leaflang.org/</a>

Streaming algorithms, AI, and design on Twitch
        <a class="moz-txt-link-freetext" href="https://www.twitch.tv/mortoray">https://www.twitch.tv/mortoray</a>

Twitter
        edaqa
        </pre>
  </body>
</html>