<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - Module functions not available for the first call after module import" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24302&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=FUniLQard59co85r6jhahB7qTIKg2ATeJEV5jzh1I1s&s=9VDB5m27kajZYy_jQkpsFW6kmujRicXagQnqDLBcVx8&e=">24302</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Module functions not available for the first call after module import
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>chying@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>After import a module from lldb, the functions in this module aren't available
in the first call, subsequent calls to the same function are ok.

It could be reproduced by these steps, 

Launch TOT lldb on MacOSX,
(lldb) expr @import Darwin
(lldb) expr MIN(5, 8)
error: use of undeclared identifier 'MIN'
error: 1 errors parsing expression
(lldb) expr MIN(5, 8)
(int) $0 = 5
(lldb) expr MIN(5, 8)
(int) $1 = 5

This started to happen after 
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Fview-3Drevision-26revision-3D242868&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=FUniLQard59co85r6jhahB7qTIKg2ATeJEV5jzh1I1s&s=PVmH2hoGR59x-ZXh_FhGphMjBkrL1UyKa5fFV7GaJo0&e=">http://llvm.org/viewvc/llvm-project?view=revision&revision=242868</a></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>