[cfe-dev] Precompiled headers with libclang
    Douglas Gregor 
    dgregor at apple.com
       
    Tue Apr  3 08:20:56 PDT 2012
    
    
  
On Apr 3, 2012, at 8:18 AM, Abhanshu Sharma wrote:
> 
> 
> On Tue, Apr 3, 2012 at 7:59 PM, Douglas Gregor <dgregor at apple.com> wrote:
> 
> On Apr 3, 2012, at 6:25 AM, Abhanshu Sharma wrote:
> 
>> 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). 
>> Is this expected? 
> 
> You'll see libclang stat'ing all of the headers in the precompiled preamble, because it needs to determine whether they have changed.
> 
>> Or libclang is just expected to access preamble file? Is there any case where it can discard contents of preamble file.
> 
> If the underlying headers change, or the #includes of the source file change, the precompiled preamble will be thrown out and regenerated.
> 
> Douglas, is there any debugging information I can generate like - Knowing when precompiled preamble is discarded, or what was file which caused it. 
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.
	- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120403/8d592962/attachment.html>
    
    
More information about the cfe-dev
mailing list