summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReader.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* PCH support for declaration statements, and a test for PredefinedExprDouglas Gregor2009-04-171-1/+24
| | | | llvm-svn: 69356
* PCH support for return statements.Douglas Gregor2009-04-171-0/+13
| | | | | | | 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-0/+28
| | | | llvm-svn: 69334
* PCH support for while and continue statementsDouglas Gregor2009-04-171-0/+24
| | | | llvm-svn: 69332
* PCH support for the first batch of statements, including null,Douglas Gregor2009-04-171-2/+133
| | | | | | compound, case, default, if, switch, and break statements. llvm-svn: 69329
* Clean up the declaration-decoding step in the PCH reader, using theDouglas Gregor2009-04-161-59/+26
| | | | | | same ueber-easy visitor scheme used for expressions/statements. llvm-svn: 69320
* Prepare PCH reader and writer for (de-)serialization of statements. NoDouglas Gregor2009-04-161-74/+79
| | | | | | functionality change. llvm-svn: 69319
* Eliminate pch::TYPE_ATTR, which is never usedDouglas Gregor2009-04-161-4/+0
| | | | llvm-svn: 69256
* PCH support for CompoundLiteralExpr. This is the last C expressionDouglas Gregor2009-04-161-0/+13
| | | | | | | 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-161-0/+102
| | | | llvm-svn: 69251
* PCH support for ShuffleVectorExpr and BlockDeclRefExprDouglas Gregor2009-04-161-0/+28
| | | | llvm-svn: 69244
* PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.Douglas Gregor2009-04-151-0/+39
| | | | llvm-svn: 69242
* PCH support for ExtVectorElementExpr and VAArgExpr.Douglas Gregor2009-04-151-0/+28
| | | | llvm-svn: 69240
* PCH support for CompoundAssignOperator and ConditionalOperatorDouglas Gregor2009-04-151-0/+25
| | | | llvm-svn: 69237
* PCH support for ImaginaryLiteral and ArraySubscriptExprDouglas Gregor2009-04-151-2/+25
| | | | llvm-svn: 69233
* PCH support for ExtQualTypeDouglas Gregor2009-04-151-4/+14
| | | | llvm-svn: 69230
* PCH support for declaration attributesDouglas Gregor2009-04-151-5/+152
| | | | llvm-svn: 69225
* PCH support for the string literal of a FileScopeAsmDecl.Douglas Gregor2009-04-151-1/+4
| | | | | | Some minor cleanup. llvm-svn: 69196
* For source location entries that describe instantiations, encode theDouglas Gregor2009-04-151-3/+1
| | | | | | | token length in the PCH file rather than trying (and failing) to reconstruct it be getting the spelling token's length. llvm-svn: 69191
* PCH support for MemberExpr and CallExpr.Douglas Gregor2009-04-151-0/+29
| | | | llvm-svn: 69186
* PCH support for string literalsDouglas Gregor2009-04-151-0/+31
| | | | llvm-svn: 69172
* PCH support for UnaryOperator, SizeOfAlignOfExprDouglas Gregor2009-04-151-0/+32
| | | | llvm-svn: 69169
* Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the ↵Douglas Gregor2009-04-151-5/+2
| | | | | | stream. LLVM has been updated to allow this llvm-svn: 69146
* PCH support for CStyleCastExpr and BinaryOperator expression kinds.Douglas Gregor2009-04-151-0/+33
| | | | llvm-svn: 69119
* PCH support for ParenExprDouglas Gregor2009-04-141-0/+13
| | | | llvm-svn: 69106
* Add PCH support for ImplicitCastExprs. This is the first expressionDouglas Gregor2009-04-141-45/+125
| | | | | | | | | | 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
* Change Lexer::MeasureTokenLength to take a LangOptions reference.Chris Lattner2009-04-141-3/+4
| | | | | | | | | | | | | | | | | | This allows it to accurately measure tokens, so that we get: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~~^ instead of the woefully inferior: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~ ^ Most of this is just plumbing to push the reference around. llvm-svn: 69099
* Add PCH support for PredefinedExpr and FloatingLiteral expressionsDouglas Gregor2009-04-141-4/+30
| | | | llvm-svn: 69084
* PCH support for a few very, very simple kinds of expressions. Hook upDouglas Gregor2009-04-141-8/+136
| | | | | | | expression (de-)serialization for VLAs, variable initializers, enum constant initializers, and bitfield widths. llvm-svn: 69075
* When writing a PCH file, keep track of all of the non-static,Douglas Gregor2009-04-141-0/+21
| | | | | | | | | 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
* Partial PCH support for FileScopeAsmDecl and BlockDecl. Both requireDouglas Gregor2009-04-131-1/+34
| | | | | | expression or statement serialization before we can test them. llvm-svn: 69002
* PCH support for functions and their parameters.Douglas Gregor2009-04-131-0/+65
| | | | llvm-svn: 68997
* PCH support for record decls/types and their fields. Now that we canDouglas Gregor2009-04-131-6/+35
| | | | | | | handle the definition of __builtin_va_list on x86-64, eliminate the forced -triple in PCH tests to get better coverage. llvm-svn: 68988
* Print the number (and percentage) of identifiers read from the PCH file as ↵Douglas Gregor2009-04-131-2/+11
| | | | | | part of its statistics llvm-svn: 68985
* Introduce PCH (de-)serialization for most compound types, excludingDouglas Gregor2009-04-131-7/+120
| | | | | | Objective-C types and record types for the moment. llvm-svn: 68984
* Add PCH support for enumerations and enumerators.Douglas Gregor2009-04-131-0/+60
| | | | llvm-svn: 68974
* Make the reading of the line table from a PCH file more robust againstDouglas Gregor2009-04-131-6/+5
| | | | | | | | the unlikely event that the filename IDs in the stored line table end up being different from the filename IDs in the newly-created line table. llvm-svn: 68965
* Include the SourceManager's line table in the PCH file. We can nowDouglas Gregor2009-04-131-3/+55
| | | | | | properly cope with #line directives in PCH files. llvm-svn: 68963
* implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310Chris Lattner2009-04-131-1/+5
| | | | llvm-svn: 68933
* now that we have an identifier table in the PCH file, finish hooking upChris Lattner2009-04-111-34/+40
| | | | | | | macro deserialization. We now correctly install II's in tokens, handle function-like macros, etc. llvm-svn: 68882
* Store unique IDs for identifiers in the PCH file. Use some bitmanglingDouglas Gregor2009-04-111-8/+38
| | | | | | | so that we only need to perform the lookup and identifier resolution once per identifier in the PCH file. llvm-svn: 68846
* Compare the predefines buffer in the PCH file with the predefinesDouglas Gregor2009-04-101-33/+136
| | | | | | | | | | | | | | | buffer generated for the current translation unit. If they are different, complain and then ignore the PCH file. This effectively checks for all compilation options that somehow would affect preprocessor state (-D, -U, -include, the dreaded -imacros, etc.). When we do accept the PCH file, throw away the contents of the predefines buffer rather than parsing them, since all of the results of that parsing are already stored in the PCH file. This eliminates the ugliness with the redefinition of __builtin_va_list, among other things. llvm-svn: 68838
* do a dance with predefines, and finally enable reading of macros fromChris Lattner2009-04-101-4/+6
| | | | | | | 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
* add support for reading macros. This does all the reading (with a bunch ofChris Lattner2009-04-101-0/+117
| | | | | | | fixme's, e.g. for tokens with identifiers) but does not actually install them. Some details with the predefines buffer needs to be sorted out first. llvm-svn: 68828
* Encode the target triple in the PCH file, and check that target triple when ↵Douglas Gregor2009-04-101-5/+18
| | | | | | using the PCH file llvm-svn: 68824
* Implement serialization/deserialization of LangOptions in the PCHDouglas Gregor2009-04-101-17/+145
| | | | | | | | | file. When de-serializing LangOptions, we check that the currently-provided language options are consistent with the options used to compile the PCH file. If they are not, we emit a diagnostic and ignore the PCH file. llvm-svn: 68820
* Various minor fixes to PCH reading and writing, with generalDouglas Gregor2009-04-101-96/+30
| | | | | | | 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-101-0/+85
| | | | | | | | | | | | 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
* Implementation of pre-compiled headers (PCH) based on lazyDouglas Gregor2009-04-091-0/+602
de-serialization of abstract syntax trees. PCH support serializes the contents of the abstract syntax tree (AST) to a bitstream. When the PCH file is read, declarations are serialized as-needed. For example, a declaration of a variable "x" will be deserialized only when its VarDecl can be found by a client, e.g., based on name lookup for "x" or traversing the entire contents of the owner of "x". This commit provides the framework for serialization and (lazy) deserialization, along with support for variable and typedef declarations (along with several kinds of types). More declarations/types, along with important auxiliary structures (source manager, preprocessor, etc.), will follow. llvm-svn: 68732
OpenPOWER on IntegriCloud