Go to file
Douglas Gregor b985eebcdf Minimize the number and kind of "external definitions" that the PCH
file needs to store. CodeGen needs to see these definitions (via
HandleTopLevelDecl), otherwise it won't be able to generate code for
them. 

This patch notifies the consumer (e.g., CodeGen) about function
definitions and variable definitions when the corresponding
declarations are deserialized. Hence, we don't eagerly deserialize the
declarations for every variable or function that has a definition in
the PCH file. This gives another 5% speedup for the Carbon-prefixed
"Hello, World!", and brings our PCH statistics down to something far
more reasonable:

*** PCH Statistics:
  13/20693 types read (0.062823%)
  17/59230 declarations read (0.028702%)
  54/44914 identifiers read (0.120230%)
  0/32954 statements read (0.000000%)
  5/6187 macros read (0.080815%)

llvm-svn: 69820
2009-04-22 19:09:20 +00:00
clang Minimize the number and kind of "external definitions" that the PCH 2009-04-22 19:09:20 +00:00
llvm Testcase for PR2958. 2009-04-22 18:55:17 +00:00