summaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReader.cpp
Commit message (Collapse)AuthorAge
...
* Add a little more data to chained PCHs. WIPSebastian Redl2010-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108528 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress !+Asserts warning.Daniel Dunbar2010-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108480 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a callback interface that allows interested parties to get notified ↵Sebastian Redl2010-07-14
| | | | | | whenever PCHReader deserializes a type or decl (and possibly other things in the future). Have PCHWriter implement these callbacks as noops and register to receive them if we're chaining PCHs. This will allow PCHWriter to track the IDs of these things, which it needs to write the dependent files. WIP git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108383 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass StringRefs by value.Benjamin Kramer2010-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108375 91177308-0d34-0410-b5e6-96231b3b80d8
* Increase the max PCH level for declarations to 7. Add a FromPCH flag to types.Sebastian Redl2010-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108354 91177308-0d34-0410-b5e6-96231b3b80d8
* Make PCHReader cope with PCH files containing more than one predefines buffer.Sebastian Redl2010-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108340 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce -f{no-}spell-checking options to enable/disableDouglas Gregor2010-07-09
| | | | | | | | spell-checking. By default, spell-checking is enabled for Clang (obviously) but disabled in CIndex for performance reasons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107992 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce PCHReader::GetTranslationUnitDecl() and use it instead of ↵Argyrios Kyrtzidis2010-07-08
| | | | | | | | | ReadDeclRecord when initializing. ReadDeclRecord would hit assertion if the translation unit declaration was already loaded during IdentifierInfo initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107885 91177308-0d34-0410-b5e6-96231b3b80d8
* For TagType and TemplateSpecializationType, isDependent calculation may be ↵Argyrios Kyrtzidis2010-07-08
| | | | | | | | | invalid because some decls that the calculation is using may still be initializing. Thus, store the isDependent flag to PCH and restore directly to Type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107873 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken reading of NestedNameSpecifiers from PCH.Argyrios Kyrtzidis2010-07-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107784 91177308-0d34-0410-b5e6-96231b3b80d8
* Delay passing InterestingDecls to the Consumer until when we know we are not ↵Argyrios Kyrtzidis2010-07-07
| | | | | | | | in recursive loading and the declarations are fully initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107783 91177308-0d34-0410-b5e6-96231b3b80d8
* Add to PCH missing Sema information about VTable uses and dynamic classes.Argyrios Kyrtzidis2010-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107664 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a regression of a previous commit of mine (rdar://8158953).Argyrios Kyrtzidis2010-07-04
| | | | | | | Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading. Introduce more suitable ASTContext::getRecordType() and getEnumType(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107598 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to install the __[u]int128_t identifier if it is already installed ↵Argyrios Kyrtzidis2010-07-04
| | | | | | | | | | by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107595 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
* 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
* Fix reading of DependentNameType.Argyrios Kyrtzidis2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107474 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow reading of InjectedClassNameType from PCH even when its decl is ↵Argyrios Kyrtzidis2010-07-02
| | | | | | currently initializing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107473 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken reading of member pointer from PCH.Argyrios Kyrtzidis2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107472 91177308-0d34-0410-b5e6-96231b3b80d8
* - Allow a typedef type to be read from PCH even if its decl is currently ↵Argyrios Kyrtzidis2010-07-02
| | | | | | | | initializing. - Fix creation of TemplateSpecializationType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107471 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken reading of "#lines" from PCH.Argyrios Kyrtzidis2010-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107470 91177308-0d34-0410-b5e6-96231b3b80d8
* Support DependentSizedArrayType for PCH.Argyrios Kyrtzidis2010-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107267 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 PCH emitting/reading for template arguments that contain expressions.Argyrios Kyrtzidis2010-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106996 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
* Implement support for -fwrapv, rdar://7221421Chris Lattner2010-06-26
| | | | | | | | | | | | | | As part of this, pull together trapv handling into the same enum. This also add support for NSW multiplies. This also makes PCH disagreement on overflow behavior silent, since it really doesn't matter except for warnings and codegen (no macros get defined etc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8
* Support DependentTemplateSpecializationType and ElaboratedType for PCH.Argyrios Kyrtzidis2010-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106858 91177308-0d34-0410-b5e6-96231b3b80d8
* Support a couple more C++ Exprs for PCH.Argyrios Kyrtzidis2010-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106727 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
* improve altivec vector bool/pixel support, patch by Anton YartsevChris Lattner2010-06-23
| | | | | | | with several tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
* -Introduce PCHReader::ReadTemplateArgumentLoc()Argyrios Kyrtzidis2010-06-22
| | | | | | | | -Introduce PCHWriter::AddTemplateArgumentLocInfo() -Modify PCHWriter::AddTemplateArgumentLoc() to also write TemplateArgumentLoc's TemplateArgument and move the existing calls of AddTemplateArgumentLoc() to AddTemplateArgumentLocInfo(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106533 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
* Split DependentNameType into two types. DependentNameType represents theJohn McCall2010-06-11
| | | | | | | | | | | | | | | | case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric!Daniel Dunbar2010-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105329 91177308-0d34-0410-b5e6-96231b3b80d8
* Alter the ExternalASTSource interface to permit by-name lookups. PCH ↵John McCall2010-06-01
| | | | | | | | | | | | | | | | continues to bring in the entire lookup table at once. Also, give ExternalSemaSource's vtable a home. This is important because otherwise any reference to it will cause RTTI to be emitted, and since clang is compiled with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's RTTI). So this change makes it possible to subclass ExternalSemaSource from projects compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105268 91177308-0d34-0410-b5e6-96231b3b80d8
* Added basic source locations to Elaborated and DependentName types.Abramo Bagnara2010-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-15
| | | | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r103770, "Added basic source locations to Elaborated and DependentNameDaniel Dunbar2010-05-14
| | | | | | types.", it is breaking Clang bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103775 91177308-0d34-0410-b5e6-96231b3b80d8
* Added basic source locations to Elaborated and DependentName types.Abramo Bagnara2010-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103770 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
* pchify CXXTemporary, CXXBindTemporaryExpr, and Chris Lattner2010-05-10
| | | | | | | CXXExprWithTemporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103387 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
* More work toward implementingFariborz Jahanian2010-04-23
| | | | | | | NeXt's -fno-constant-cfstrings - wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102189 91177308-0d34-0410-b5e6-96231b3b80d8
* Check for -fno-constant-cfstrings consistencyFariborz Jahanian2010-04-22
| | | | | | | in pch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102130 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are notChandler Carruth2010-04-17
| | | | | | | | | implemented precisely the same as GCC, but the distinction GCC makes isn't useful to represent. This allows parsing code which uses GCC-specific keywords ('asm', etc.) without parsing in a fully GNU mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101667 91177308-0d34-0410-b5e6-96231b3b80d8
* On Windows, disable the modification-time check for files used inDouglas Gregor2010-04-09
| | | | | | | | | precompiled headers and/or when reading the contents of the file into memory. These checks seem to be causing spurious regression-test failures on Windows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100866 91177308-0d34-0410-b5e6-96231b3b80d8
* Make code-completion for Objective-C message sends to "id" work in theDouglas Gregor2010-04-06
| | | | | | | | | presence of precompiled headers by forcibly loading all of the methods we know about from the PCH file before constructing our code-completion list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100535 91177308-0d34-0410-b5e6-96231b3b80d8
* Match MemoryBuffer API changes.Chris Lattner2010-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100484 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TypenameType to DependentNameType in anticipation of someDouglas Gregor2010-03-31
| | | | | | | refactoring work in this area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8