summaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReaderDecl.cpp
Commit message (Collapse)AuthorAge
...
* Read/write specialization info of static data members for PCH.Argyrios Kyrtzidis2010-07-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107593 91177308-0d34-0410-b5e6-96231b3b80d8
* When setting the anonymous namespace at PCH reading, it may still be ↵Argyrios Kyrtzidis2010-07-03
| | | | | | | | initializing so avoid the invariant checks at NamespaceDecl::setAnonymousNamespace(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107566 91177308-0d34-0410-b5e6-96231b3b80d8
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-03
| | | | | | | | | | | | | | | | | | | | declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
* Lazily declare implicit copy constructors.Douglas Gregor2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107543 91177308-0d34-0410-b5e6-96231b3b80d8
* Read/write CastExpr's CXXBaseSpecifierArray for PCH.Argyrios Kyrtzidis2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107542 91177308-0d34-0410-b5e6-96231b3b80d8
* Lazily declare copy-assignment operators.Douglas Gregor2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107521 91177308-0d34-0410-b5e6-96231b3b80d8
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107510 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.Argyrios Kyrtzidis2010-07-02
| | | | | | <vector> header can be used correctly through PCH now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107483 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix reading FunctionDecls from PCH.Argyrios Kyrtzidis2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107477 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix reading ClassTemplateDecl's ClassTemplateSpecializationDecls and ↵Argyrios Kyrtzidis2010-07-02
| | | | | | | | ClassTemplatePartialSpecializationDecls. Store/read also their template arguments because they may be initializing and not be able to provide them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107476 91177308-0d34-0410-b5e6-96231b3b80d8
* Fully read/write CXXRecordDecl for PCH.Argyrios Kyrtzidis2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107475 91177308-0d34-0410-b5e6-96231b3b80d8
* Generally types expect an initialized TypeDecl; its safer and less ↵Argyrios Kyrtzidis2010-07-02
| | | | | | complicated to delay PCH reading the type of a TypeDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107469 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some side-effect free Create methods for TypeDecl subclasses and use ↵Argyrios Kyrtzidis2010-07-02
| | | | | | them for PCH reading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.Argyrios Kyrtzidis2010-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107268 91177308-0d34-0410-b5e6-96231b3b80d8
* Support C++ friend declarations for PCH.Argyrios Kyrtzidis2010-06-29
| | | | | | | | | | | | This commit 'introduces' a slightly different way to restore the state of the AST object. It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object. The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to: -Avoid complications with objects that have side-effects during creation or when using some setters. -Not 'pollute' the AST interface with methods only used by the PCH reader/writer -Allow AST objects to be read-only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107219 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the way sub-statements are stored and retrieved from PCH.Argyrios Kyrtzidis2010-06-28
| | | | | | | | | | | | | | | Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g. x = sizeof(int[1]); would crash PCH. Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107087 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix various bugs in recent commits for C++ PCH.Argyrios Kyrtzidis2010-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106995 91177308-0d34-0410-b5e6-96231b3b80d8
* Support NonTypeTemplateParmDecl for PCH.Argyrios Kyrtzidis2010-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106860 91177308-0d34-0410-b5e6-96231b3b80d8
* Support C++ class template specializations and partial specializations for PCH.Argyrios Kyrtzidis2010-06-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106625 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to provide separate ASTs for multiple ObjC class extension Fariborz Jahanian2010-06-22
| | | | | | | | declarations (implements radar 7928731). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106597 91177308-0d34-0410-b5e6-96231b3b80d8
* Support emitting/reading function templates to/from PCH.Argyrios Kyrtzidis2010-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106534 91177308-0d34-0410-b5e6-96231b3b80d8
* Combine ClassTemplateDecl's PreviousDeclaration with CommonPtr, as in ↵Argyrios Kyrtzidis2010-06-21
| | | | | | FunctionTemplateDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106412 91177308-0d34-0410-b5e6-96231b3b80d8
* Support PCH emitting/reading of using declarations.Argyrios Kyrtzidis2010-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106404 91177308-0d34-0410-b5e6-96231b3b80d8
* Include a hack to allow loading of templated CXXRecordDecls and test ↵Argyrios Kyrtzidis2010-06-19
| | | | | | template reading from PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106393 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for reading templates from PCH.Argyrios Kyrtzidis2010-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106392 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for writing templates to PCH.Argyrios Kyrtzidis2010-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106391 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement first TD-based usage of attributes.Sean Hunt2010-06-16
| | | | | | | | | | | | | | | | | Currently, there are two effective changes: - Attr::Kind has been changed to attr::Kind, in a separate namespace rather than the Attr class. This is because the enumerator needs to be visible to parse. - The class definitions for the C++0x attributes other than aligned are generated by TableGen. The specific classes generated by TableGen are controlled by an array in TableGen (see the accompanying commit to the LLVM repository). I will be expanding the amount of code generated as I develop the new attributes system while initially keeping it confined to these attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106172 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PCH issue. Attributes of a declaration were truncated to just one when ↵Argyrios Kyrtzidis2010-06-11
| | | | | | the decl was read from a PCH file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105852 91177308-0d34-0410-b5e6-96231b3b80d8
* Added AccessSpecDecl node.Abramo Bagnara2010-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember type source information for Objective C property declarations.John McCall2010-06-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105484 91177308-0d34-0410-b5e6-96231b3b80d8
* Restructure how we interpret block-literal declarators. Correctly handleJohn McCall2010-06-04
| | | | | | | | | the case where we pick up block arguments from a typedef. Save the block signature as it was written, and preserve same through PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105466 91177308-0d34-0410-b5e6-96231b3b80d8
* Hack in some really terrible C++ record PCH support that I need right now.John McCall2010-06-03
| | | | | | | | | | This is required in order to test: The ASTImporter should set base classes after formally entering the definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105401 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert DeclNodes to use TableGen.Sean Hunt2010-05-30
| | | | | | | | The macros required for DeclNodes use have changed to match the use of StmtNodes. The FooFirst enumerator constants have been named firstFoo to match usage elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll back r104941.John McCall2010-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104990 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-28
| | | | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104941 91177308-0d34-0410-b5e6-96231b3b80d8
* AST: Add AlignMac68kAttr, not yet used.Daniel Dunbar2010-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104800 91177308-0d34-0410-b5e6-96231b3b80d8
* AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.Daniel Dunbar2010-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang support for IBOutletCollection.Ted Kremenek2010-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for Microsoft's __thiscall, from Steven Watanabe!Douglas Gregor2010-05-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement semantic analysis and an AST representation for the namedDouglas Gregor2010-05-15
| | | | | | | | | | | | | | return value optimization. Sema marks return statements with their NRVO candidates (which may or may not end up using the NRVO), then, at the end of a function body, computes and marks those variables that can be allocated into the return slot. I've checked this locally with some debugging statements (not committed), but there won't be any tests until CodeGen comes along. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
* Merged Elaborated and QualifiedName types.Abramo Bagnara2010-05-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
* add PCH support for a bunch of C++ Decls, patch byChris Lattner2010-05-07
| | | | | | | Andrew Sutton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103301 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember the number of positive and negative bits used by the enumerators ofJohn McCall2010-05-06
| | | | | | | | | an enum in the enum decl itself. Use some spare bits from TagDecl for this purpose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103173 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch deals with Sema Part of Setter/Getter synthesisFariborz Jahanian2010-05-05
| | | | | | | | of properties which are of C++ objects. Code Gen to follow (Radar 7468090). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
* Diagnose unused exception parameters under a different warning groupDouglas Gregor2010-05-03
| | | | | | | | | (-Wunused-exception-parameter) than normal variables, since it's more common to name and then ignore an exception parameter. This warning is neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102931 91177308-0d34-0410-b5e6-96231b3b80d8
* More of Sema to implement initialization ofFariborz Jahanian2010-04-28
| | | | | | | | ivar of c++ object types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102500 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r102215, this time being more careful to only set the "principalJohn McCall2010-04-24
| | | | | | | | | declaration" (i.e. the only which will actually be looked up) to have the non-member-operator bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r102215. This causes clang crash while compiling a test case from gdb ↵Devang Patel2010-04-24
| | | | | | testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
* Transition the last acceptable-result filter kind in LookupResult over to useJohn McCall2010-04-23
| | | | | | | | a simple IDNS mask by introducing a namespace for non-member operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of the actual storage specifier written on a variable orDouglas Gregor2010-04-19
| | | | | | | | | function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8