clang-1/lib/Frontend
Douglas Gregor 0af2ca4b6d 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%)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 19:09:20 +00:00
..
CMakeLists.txt Split preprocessor initialization logic out of clang-cc into 2009-04-21 05:40:52 +00:00
FixItRewriter.cpp Change Lexer::MeasureTokenLength to take a LangOptions reference. 2009-04-14 23:22:57 +00:00
HTMLDiagnostics.cpp refactor htmldiags to be created up front like the other diag clients. 2009-04-17 20:40:01 +00:00
InitHeaderSearch.cpp improve compatibility with GCC 4.4, patch by Michel Salim (PR3697) 2009-03-02 22:20:04 +00:00
InitPreprocessor.cpp Add another workaround for -include. 2009-04-22 08:53:01 +00:00
Makefile Build system changes to use TableGen to generate the various 2009-03-16 23:06:59 +00:00
ManagerRegistry.cpp Rename lib/Driver (etc) to lib/Frontend in prep for the *actual* 2009-03-02 06:16:29 +00:00
PCHReader.cpp Minimize the number and kind of "external definitions" that the PCH 2009-04-22 19:09:20 +00:00
PCHWriter.cpp Minimize the number and kind of "external definitions" that the PCH 2009-04-22 19:09:20 +00:00
PlistDiagnostics.cpp Plist diagnostics: Remove deprecated single-point locations in control-flow 2009-04-21 21:03:00 +00:00
TextDiagnosticBuffer.cpp Rename lib/Driver (etc) to lib/Frontend in prep for the *actual* 2009-03-02 06:16:29 +00:00
TextDiagnosticPrinter.cpp make "in included from" and "in instatiation from" messages respect 2009-04-21 03:57:54 +00:00