<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dan433584@gmail.com" title="Dan Gohman <dan433584@gmail.com>"> <span class="fn">Dan Gohman</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - WASM backend generates invalid wasm for undeclared imports"
   href="https://bugs.llvm.org/show_bug.cgi?id=35385">bug 35385</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - WASM backend generates invalid wasm for undeclared imports"
   href="https://bugs.llvm.org/show_bug.cgi?id=35385#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - WASM backend generates invalid wasm for undeclared imports"
   href="https://bugs.llvm.org/show_bug.cgi?id=35385">bug 35385</a>
              from <span class="vcard"><a class="email" href="mailto:dan433584@gmail.com" title="Dan Gohman <dan433584@gmail.com>"> <span class="fn">Dan Gohman</span></a>
</span></b>
        <pre>This is now fixed in r319186. My option C turned out to be even easier than I
expected; there's no need for FixFunctionBitcasts to pass a 0 argument, because
that's an ABI detail handled in codegen. So this turned out to be a fairly
simple generalization of the existing wrapper logic.

FixFunctionBitcasts now handles all the obvious cases with bitcasting to or
from varargs. Complex cases which theoretically should work but don't should be
rare, but if anyone finds one in real world, please report it.

<span class="quote">> ==== file1.c ====
> extern void underspecified();
> void callWithArgs() { underspecified(1,2,3); }</span >

This is now handled through FixFunctionBitcasts; it generates code like this:

extern void underspecified();
void wrapper(int a, int b, int c) { underspecified(1, 2, 3); }
void callWithArgs() { wrapper(1,2,3); }

which is then codegen'd to valid wasm.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>