| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
identifiers from a precompiled header.
This patch changes the primary name lookup method for entities within
a precompiled header. Previously, we would load all of the names of
declarations at translation unit scope into a large DenseMap (inside
the TranslationUnitDecl's DeclContext), and then perform a special
"last resort" lookup into this DeclContext when we knew there was a
PCH file (see Sema::LookupName). Now, when we see an identifier named
for the first time, we load all of the declarations with that name
that are visible from the translation unit into the IdentifierInfo's
chain of declarations. Thus, the explicit "look into the translation
unit's DeclContext" code is gone, and Sema effectively uses the same
IdentifierInfo-based name lookup mechanism whether we are using a PCH
file or not.
This approach should help PCH scale with the size of the input program
rather than the size of the PCH file. The "Hello, World!" application
with Carbon.h as a PCH file now loads 20% of the identifiers in the
PCH file rather than 85% of the identifiers.
90% of the 20% of identifiers loaded are actually loaded when we
deserialize the preprocessor state. The next step is to make the
preprocessor load macros lazily, which should drastically reduce the
number of types, declarations, and identifiers loaded for "Hello,
World".
llvm-svn: 69737
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tentative definitions off to the ASTConsumer at the end of the
translation unit.
Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.
Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.
llvm-svn: 69681
|
|
|
|
|
|
| |
Test will be enabled with ObjCInterfaceDecl is added.
llvm-svn: 69594
|
|
|
|
| |
llvm-svn: 69457
|
|
|
|
|
|
|
|
| |
AST context's __builtin_va_list type will be set when the PCH file is
loaded. This fixes the crash when CodeGen'ing a va_arg expression
pulled in from a PCH file.
llvm-svn: 69421
|
|
|
|
|
|
|
|
| |
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.
llvm-svn: 69406
|
|
|
|
|
|
|
|
|
| |
1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator
2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s.
403.gcc builds and links properly.
llvm-svn: 69390
|
|
|
|
|
|
|
| |
This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.
llvm-svn: 69385
|
|
|
|
|
|
| |
a BlockDeclRefExpr
llvm-svn: 69376
|
|
|
|
| |
llvm-svn: 69373
|
|
|
|
| |
llvm-svn: 69370
|
|
|
|
| |
llvm-svn: 69369
|
|
|
|
| |
llvm-svn: 69364
|
|
|
|
| |
llvm-svn: 69356
|
|
|
|
|
|
|
| |
Optimize PCH encoding for switch-case statements slightly, by making
the switch-case numbering local to a particular statement.
llvm-svn: 69355
|
|
|
|
| |
llvm-svn: 69334
|
|
|
|
| |
llvm-svn: 69332
|
|
|
|
|
|
| |
compound, case, default, if, switch, and break statements.
llvm-svn: 69329
|
|
|
|
|
|
|
| |
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).
llvm-svn: 69255
|
|
|
|
| |
llvm-svn: 69251
|
|
|
|
| |
llvm-svn: 69244
|
|
|
|
| |
llvm-svn: 69242
|
|
|
|
| |
llvm-svn: 69240
|
|
|
|
| |
llvm-svn: 69237
|
|
|
|
| |
llvm-svn: 69233
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- PR3980.
- <rdar://problem/6762287> [irgen] crash when generating tentative
definition of incomplete structure
- This also avoids creating common definitions for things which are
later overwritten.
- XFAIL'ed external-defs.c, it isn't completing types properly yet.
llvm-svn: 69231
|
|
|
|
| |
llvm-svn: 69230
|
|
|
|
| |
llvm-svn: 69225
|
|
|
|
| |
llvm-svn: 69186
|
|
|
|
| |
llvm-svn: 69172
|
|
|
|
| |
llvm-svn: 69169
|
|
|
|
| |
llvm-svn: 69119
|
|
|
|
| |
llvm-svn: 69106
|
|
|
|
|
|
|
|
|
|
| |
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.
llvm-svn: 69101
|
|
|
|
| |
llvm-svn: 69084
|
|
|
|
|
|
|
| |
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.
llvm-svn: 69075
|
|
|
|
|
|
| |
Committed with a FIXME so that we don't forget it
llvm-svn: 69052
|
|
|
|
|
|
|
|
|
| |
wrap-up (e.g., turning tentative definitions into definitions). Also,
very that, when we actually use the PCH file, we get the ride code
generation for tentative definitions and definitions that show up in
the PCH file.
llvm-svn: 69043
|
|
|
|
|
|
|
|
|
| |
non-inline external definitions (and tentative definitions) that are
found at the top level. The corresponding declarations are stored in a
record in the PCH file, so that they can be provided to the
ASTConsumer (via HandleTopLevelDecl) when the PCH file is read.
llvm-svn: 69005
|
|
|
|
| |
llvm-svn: 68997
|
|
|
|
|
|
|
| |
handle the definition of __builtin_va_list on x86-64, eliminate the
forced -triple in PCH tests to get better coverage.
llvm-svn: 68988
|
|
|
|
|
|
| |
Objective-C types and record types for the moment.
llvm-svn: 68984
|
|
|
|
| |
llvm-svn: 68974
|
|
|
|
|
|
| |
properly cope with #line directives in PCH files.
llvm-svn: 68963
|
|
|
|
| |
llvm-svn: 68933
|
|
|
|
|
|
|
| |
macro deserialization. We now correctly install II's in tokens, handle
function-like macros, etc.
llvm-svn: 68882
|
|
|
|
| |
llvm-svn: 68881
|
|
|
|
|
|
|
| |
PCH. This works now, except for limitations not being able to do things
with identifiers. The basic example in the testcase works though.
llvm-svn: 68832
|
|
|
|
|
|
|
| |
cleanup. Aside from a minor tweak to the PCH file format, no
functionality change.
llvm-svn: 68793
|
|
|
|
|
|
|
|
|
|
|
|
| |
improvement, source locations read from the PCH file will properly
resolve to the source files that were used to build the PCH file
itself.
Once we have the preprocessor state stored in the PCH file, source
locations that refer to macro instantiations that occur in the PCH
file should have the appropriate instantiation information.
llvm-svn: 68758
|