summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH
Commit message (Collapse)AuthorAgeFilesLines
...
* Lazy deserialization of the declaration chains associated withDouglas Gregor2009-04-212-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Explictly track tentative definitions within Sema, then hand thoseDouglas Gregor2009-04-211-2/+1
| | | | | | | | | | | | | | | 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
* Add pch reader/writer support for ObjCMethodDecl.Steve Naroff2009-04-202-0/+17
| | | | | | Test will be enabled with ObjCInterfaceDecl is added. llvm-svn: 69594
* make sure to verify that the "non pch" runs worked.Chris Lattner2009-04-1813-13/+13
| | | | llvm-svn: 69457
* Store the type ID for __builtin_va_list in the PCH file, so that theDouglas Gregor2009-04-181-3/+2
| | | | | | | | 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
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-183-7/+8
| | | | | | | | 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
* Fix two embarrassing PCH bugs:Douglas Gregor2009-04-172-0/+24
| | | | | | | | | 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
* PCH support for inline assembly statements.Douglas Gregor2009-04-172-0/+25
| | | | | | | This completes support for all of C (+ extensions). We can (again) build a PCH file for Carbon.h. llvm-svn: 69385
* PCH tests for va_arg expressions. Verified that the blocks test does create ↵Douglas Gregor2009-04-172-0/+20
| | | | | | a BlockDeclRefExpr llvm-svn: 69376
* PCH support for blocksDouglas Gregor2009-04-173-3/+29
| | | | llvm-svn: 69373
* PCH support for GNU statement expressionsDouglas Gregor2009-04-172-0/+7
| | | | llvm-svn: 69370
* PCH support for indirect gotos and address-of-label expressions.Douglas Gregor2009-04-172-0/+20
| | | | llvm-svn: 69369
* PCH support for labels and goto.Douglas Gregor2009-04-171-0/+8
| | | | llvm-svn: 69364
* PCH support for declaration statements, and a test for PredefinedExprDouglas Gregor2009-04-172-2/+7
| | | | llvm-svn: 69356
* PCH support for return statements.Douglas Gregor2009-04-172-3/+26
| | | | | | | Optimize PCH encoding for switch-case statements slightly, by making the switch-case numbering local to a particular statement. llvm-svn: 69355
* PCH support for do-while and for loopsDouglas Gregor2009-04-171-1/+8
| | | | llvm-svn: 69334
* PCH support for while and continue statementsDouglas Gregor2009-04-171-0/+7
| | | | llvm-svn: 69332
* PCH support for the first batch of statements, including null,Douglas Gregor2009-04-172-0/+30
| | | | | | compound, case, default, if, switch, and break statements. llvm-svn: 69329
* PCH support for CompoundLiteralExpr. This is the last C expressionDouglas Gregor2009-04-162-0/+7
| | | | | | | that does not require PCH support for statements. Only AddrLabelExpr, StmtExpr, and BlockExpr remain (for C). llvm-svn: 69255
* PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.Douglas Gregor2009-04-162-0/+17
| | | | llvm-svn: 69251
* PCH support for ShuffleVectorExpr and BlockDeclRefExprDouglas Gregor2009-04-162-1/+7
| | | | llvm-svn: 69244
* PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.Douglas Gregor2009-04-152-0/+18
| | | | llvm-svn: 69242
* PCH support for ExtVectorElementExpr and VAArgExpr.Douglas Gregor2009-04-152-0/+7
| | | | llvm-svn: 69240
* PCH support for CompoundAssignOperator and ConditionalOperatorDouglas Gregor2009-04-152-0/+12
| | | | llvm-svn: 69237
* PCH support for ImaginaryLiteral and ArraySubscriptExprDouglas Gregor2009-04-152-0/+14
| | | | llvm-svn: 69233
* Defer generation of tentative definitions.Daniel Dunbar2009-04-151-0/+2
| | | | | | | | | | | | | | - 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
* PCH support for ExtQualTypeDouglas Gregor2009-04-152-4/+13
| | | | llvm-svn: 69230
* PCH support for declaration attributesDouglas Gregor2009-04-152-0/+15
| | | | llvm-svn: 69225
* PCH support for MemberExpr and CallExpr.Douglas Gregor2009-04-152-0/+17
| | | | llvm-svn: 69186
* PCH support for string literalsDouglas Gregor2009-04-152-0/+8
| | | | llvm-svn: 69172
* PCH support for UnaryOperator, SizeOfAlignOfExprDouglas Gregor2009-04-152-1/+16
| | | | llvm-svn: 69169
* PCH support for CStyleCastExpr and BinaryOperator expression kinds.Douglas Gregor2009-04-152-2/+14
| | | | llvm-svn: 69119
* PCH support for ParenExprDouglas Gregor2009-04-141-1/+1
| | | | llvm-svn: 69106
* Add PCH support for ImplicitCastExprs. This is the first expressionDouglas Gregor2009-04-141-1/+1
| | | | | | | | | | 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
* Add PCH support for PredefinedExpr and FloatingLiteral expressionsDouglas Gregor2009-04-144-4/+15
| | | | llvm-svn: 69084
* PCH support for a few very, very simple kinds of expressions. Hook upDouglas Gregor2009-04-1411-10/+49
| | | | | | | expression (de-)serialization for VLAs, variable initializers, enum constant initializers, and bitfield widths. llvm-svn: 69075
* Add a tricky, tricky test case for PCH that we currently don't handle. ↵Douglas Gregor2009-04-142-0/+14
| | | | | | Committed with a FIXME so that we don't forget it llvm-svn: 69052
* When building a PCH file, don't perform end-of-translation-unitDouglas Gregor2009-04-142-4/+24
| | | | | | | | | 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
* When writing a PCH file, keep track of all of the non-static,Douglas Gregor2009-04-142-0/+18
| | | | | | | | | 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
* PCH support for functions and their parameters.Douglas Gregor2009-04-132-0/+26
| | | | llvm-svn: 68997
* PCH support for record decls/types and their fields. Now that we canDouglas Gregor2009-04-136-12/+61
| | | | | | | handle the definition of __builtin_va_list on x86-64, eliminate the forced -triple in PCH tests to get better coverage. llvm-svn: 68988
* Introduce PCH (de-)serialization for most compound types, excludingDouglas Gregor2009-04-132-0/+103
| | | | | | Objective-C types and record types for the moment. llvm-svn: 68984
* Add PCH support for enumerations and enumerators.Douglas Gregor2009-04-132-0/+31
| | | | llvm-svn: 68974
* Include the SourceManager's line table in the PCH file. We can nowDouglas Gregor2009-04-133-1/+28
| | | | | | properly cope with #line directives in PCH files. llvm-svn: 68963
* implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310Chris Lattner2009-04-132-1/+13
| | | | llvm-svn: 68933
* now that we have an identifier table in the PCH file, finish hooking upChris Lattner2009-04-112-1/+2
| | | | | | | macro deserialization. We now correctly install II's in tokens, handle function-like macros, etc. llvm-svn: 68882
* test this in non-pch mode as well as in pch mode.Chris Lattner2009-04-112-0/+9
| | | | llvm-svn: 68881
* do a dance with predefines, and finally enable reading of macros fromChris Lattner2009-04-102-0/+4
| | | | | | | 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
* Various minor fixes to PCH reading and writing, with generalDouglas Gregor2009-04-101-2/+2
| | | | | | | cleanup. Aside from a minor tweak to the PCH file format, no functionality change. llvm-svn: 68793
* PCH serialization/deserialization of the source manager. With thisDouglas Gregor2009-04-102-2/+13
| | | | | | | | | | | | 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
OpenPOWER on IntegriCloud