<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 3, 2012, at 8:18 AM, Abhanshu Sharma wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Tue, Apr 3, 2012 at 7:59 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div class="im"><div>On Apr 3, 2012, at 6:25 AM, Abhanshu Sharma wrote:</div><br><blockquote type="cite">I have actually set it 'on' already. But by running strace, I found that libclang is still accessing quite a few headers (Although Number of headers accessed reduced a bit). <div>
Is this expected? </div></blockquote><div><br></div></div><div>You'll see libclang stat'ing all of the headers in the precompiled preamble, because it needs to determine whether they have changed.</div><div class="im">
<br><blockquote type="cite">
<div>Or libclang is just expected to access preamble file? Is there any case where it can discard contents of preamble file.</div></blockquote><div><br></div></div><div>If the underlying headers change, or the #includes of the source file change, the precompiled preamble will be thrown out and regenerated.</div>
</div></div></blockquote><div><br></div><div>Douglas, is there any debugging information I can generate like - Knowing when precompiled preamble is discarded, or what was file which caused it. </div></div></blockquote><br></div><div>Set the environment variable LIBCLANG_TIMING to get some timing data, which will say when (but not why) the precompiled preamble is (re)built. For any more information than that, you'll have to modify Clang itself.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">  </span>- Doug</div><br></body></html>