<div dir="ltr">On Tue, Sep 10, 2013 at 7:13 PM, Ben Niu <span dir="ltr"><<a href="mailto:niuben003@gmail.com" target="_blank">niuben003@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px">



Dear LLVM developers,</p><p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px">



My name is Ben Niu and I am a Ph.D. student at Lehigh University. I compiled the MUSL C library using Clang 3.3, and dumped the generated LLVM IR files. I found that the MUSL-defined FILE struct (aliasing __FILE_s)<br></p>



<pre style="max-height:600px;width:auto;background-color:rgb(238,238,238);margin-bottom:10px;padding:5px;vertical-align:baseline;line-height:18px;font-size:14px;overflow:auto;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;margin-top:0px;border:0px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> __FILE_s </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">{</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> flags</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">rpos</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">rend</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">int</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">close</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)(</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">FILE</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*);</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">wend</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">wpos</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">mustbezero_1</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">wbase</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">size_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">read</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)(</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">FILE</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">size_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">);</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">size_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">write</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)(</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">FILE</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">const</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">size_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">);</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">off_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">seek</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)(</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">FILE</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">off_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">int</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">);</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">buf</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">size_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> buf_size</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">FILE</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">prev</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">next</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">int</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> fd</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">int</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> pipe_pid</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">long</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> lockcount</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">short</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> dummy3</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">signed</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> mode</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">signed</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> lbf</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">int</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> lock</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">int</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> waiters</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">void</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">cookie</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">off_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> off</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">getln_buf</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">void</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">mustbezero_2</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">unsigned</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">char</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">shend</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
    </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175)">off_t</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> shlim</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> shcnt</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">
</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">};</span></code></pre><p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px">



was represented by</p><pre style="max-height:600px;width:auto;background-color:rgb(238,238,238);margin-bottom:10px;padding:5px;vertical-align:baseline;line-height:18px;font-size:14px;overflow:auto;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;margin-top:0px;border:0px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> type </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">{</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i32 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*)*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i64 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i64 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i64 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i16</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">}</span></code></pre>



<p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px">

in some IR files, but was represented by</p><pre style="max-height:600px;width:auto;background-color:rgb(238,238,238);margin-bottom:10px;padding:5px;vertical-align:baseline;line-height:18px;font-size:14px;overflow:auto;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;margin-top:0px;border:0px">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">=</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> type </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">{</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i32 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*)*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i64 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">{}*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i64 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">(%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">)*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">%</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">struct</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">.</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">__FILE_s</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i16</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i32</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> 
i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i8</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">,</span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> i64 </span><span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">}</span></code></pre>



<p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px">

in other source files. All these source files include the complete FILE struct definition. The only difference between these two IR structs is that a function pointer type field in the first form is replaced by {}* in the second form. Could anyone tell me why this happens and how to disable the {}* replacement?</p>

<p style="clear:both;vertical-align:baseline;line-height:18px;font-size:14px;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;margin:0px 0px 1em;word-wrap:break-word;border:0px;padding:0px"><br>

</p></div></blockquote><div>See CodeGenTypes::isFuncTypeArgumentConvertible in clang/lib/CodeGen/CodeGenTypes.cpp; this behavior exists to protect the type conversion code from infinite recursion. Our behavior could probably be improved here; patches welcome (but be warned the code is rather complicated).<br>
</div><div><br></div><div>Off the top of my head, I can't say why this is triggering in some files, but not others.<br></div><div><br></div><div>-Eli </div>
</div><br></div></div>