Chris Lattner
409d4e716a
refactor htmldiags to be created up front like the other diag clients.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 20:40:01 +00:00
Douglas Gregor
f7dac085f8
PCH tests for va_arg expressions. Verified that the blocks test does create a BlockDeclRefExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69376 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 20:06:59 +00:00
Douglas Gregor
84af7c27cd
PCH support for blocks
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 19:21:43 +00:00
Douglas Gregor
6a2dd55b0b
PCH support for GNU statement expressions
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 19:05:30 +00:00
Douglas Gregor
7d5c2f241c
PCH support for indirect gotos and address-of-label expressions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69369 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 18:58:21 +00:00
Douglas Gregor
1de05feeea
PCH support for labels and goto.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 18:18:49 +00:00
Douglas Gregor
84f2170062
PCH support for declaration statements, and a test for PredefinedExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 16:55:36 +00:00
Douglas Gregor
0de9d8857b
PCH support for return statements.
...
Optimize PCH encoding for switch-case statements slightly, by making
the switch-case numbering local to a particular statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 16:34:57 +00:00
Douglas Gregor
67d8249924
PCH support for do-while and for loops
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 00:29:51 +00:00
Douglas Gregor
d921cf976b
PCH support for while and continue statements
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69332 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 00:16:09 +00:00
Douglas Gregor
025452fa0e
PCH support for the first batch of statements, including null,
...
compound, case, default, if, switch, and break statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69329 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17 00:04:06 +00:00
Douglas Gregor
cb70bb2899
Clean up the declaration-decoding step in the PCH reader, using the
...
same ueber-easy visitor scheme used for expressions/statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 22:29:51 +00:00
Douglas Gregor
c9490c000f
Prepare PCH reader and writer for (de-)serialization of statements. No
...
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 22:23:12 +00:00
Chris Lattner
19cbb44e3c
tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 05:52:14 +00:00
Chris Lattner
d51d74a3e8
implement framework for -fdiagnostics-show-option, but tblgen isn't
...
passing down the right info yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69268 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 05:44:38 +00:00
Douglas Gregor
63f5c2646e
Eliminate pch::TYPE_ATTR, which is never used
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 02:45:14 +00:00
Douglas Gregor
ba6d7e7fa5
PCH support for CompoundLiteralExpr. This is the last C expression
...
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 02:33:48 +00:00
Douglas Gregor
d077d759d0
PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 00:55:48 +00:00
Douglas Gregor
94cd5d1397
PCH support for ShuffleVectorExpr and BlockDeclRefExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16 00:01:45 +00:00
Douglas Gregor
44cae0c866
PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 23:33:31 +00:00
Douglas Gregor
d3c98a02c7
PCH support for ExtVectorElementExpr and VAArgExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 23:02:49 +00:00
Douglas Gregor
ad90e96fb7
PCH support for CompoundAssignOperator and ConditionalOperator
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69237 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 22:40:36 +00:00
Douglas Gregor
cb2ca73c1d
PCH support for ImaginaryLiteral and ArraySubscriptExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 22:19:53 +00:00
Douglas Gregor
6d47396712
PCH support for ExtQualType
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 22:00:08 +00:00
Douglas Gregor
68a2eb0cc7
PCH support for declaration attributes
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69225 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 21:30:51 +00:00
Douglas Gregor
6a2bfb2ead
PCH support for the string literal of a FileScopeAsmDecl.
...
Some minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 18:43:11 +00:00
Douglas Gregor
f60e991869
For source location entries that describe instantiations, encode the
...
token length in the PCH file rather than trying (and failing) to
reconstruct it be getting the spelling token's length.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 18:05:10 +00:00
Douglas Gregor
1f0d0133b0
PCH support for MemberExpr and CallExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 17:43:59 +00:00
Douglas Gregor
673ecd6a4a
PCH support for string literals
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 16:35:07 +00:00
Douglas Gregor
0b0b77fa29
PCH support for UnaryOperator, SizeOfAlignOfExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 15:58:59 +00:00
Douglas Gregor
62e445c4df
Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream. LLVM has been updated to allow this
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 04:54:29 +00:00
Douglas Gregor
db600c330a
PCH support for CStyleCastExpr and BinaryOperator expression kinds.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 00:25:59 +00:00
Douglas Gregor
c04db4feef
PCH support for ParenExpr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 23:59:37 +00:00
Douglas Gregor
087fd53680
Add PCH support for ImplicitCastExprs. This is the first expression
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 23:32:43 +00:00
Chris Lattner
2c78b873f4
Change Lexer::MeasureTokenLength to take a LangOptions reference.
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 23:22:57 +00:00
Douglas Gregor
17fc223395
Add PCH support for PredefinedExpr and FloatingLiteral expressions
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 21:55:33 +00:00
Douglas Gregor
0b7489194f
PCH support for a few very, very simple kinds of expressions. Hook up
...
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 21:18:50 +00:00
Douglas Gregor
fdd0172ca1
When writing a PCH file, keep track of all of the non-static,
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14 00:24:19 +00:00
Douglas Gregor
1028bc67d5
Partial PCH support for FileScopeAsmDecl and BlockDecl. Both require
...
expression or statement serialization before we can test them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 22:49:25 +00:00
Douglas Gregor
3a2f7e4251
PCH support for functions and their parameters.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 22:18:37 +00:00
Douglas Gregor
8c70006581
PCH support for record decls/types and their fields. Now that we can
...
handle the definition of __builtin_va_list on x86-64, eliminate the
forced -triple in PCH tests to get better coverage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 21:20:57 +00:00
Douglas Gregor
2d41cc1a8c
Print the number (and percentage) of identifiers read from the PCH file as part of its statistics
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 20:50:16 +00:00
Douglas Gregor
b4e715beeb
Introduce PCH (de-)serialization for most compound types, excluding
...
Objective-C types and record types for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 20:46:52 +00:00
Douglas Gregor
0a2b45e588
Add PCH support for enumerations and enumerators.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 18:14:40 +00:00
Douglas Gregor
ff0a9872aa
Make the reading of the line table from a PCH file more robust against
...
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 17:12:42 +00:00
Douglas Gregor
bd94500d3a
Include the SourceManager's line table in the PCH file. We can now
...
properly cope with #line directives in PCH files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 16:31:14 +00:00
Chris Lattner
c1f9d828c7
implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 01:29:17 +00:00
Chris Lattner
7356a31327
now that we have an identifier table in the PCH file, finish hooking up
...
macro deserialization. We now correctly install II's in tokens, handle
function-like macros, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68882 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-11 21:15:38 +00:00
Chris Lattner
3c304bd9ec
add some #includes for better compatibility with gcc 4.4,
...
thanks to Tobias Stadler for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68868 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-11 18:40:46 +00:00
Douglas Gregor
afaf308b77
Store unique IDs for identifiers in the PCH file. Use some bitmangling
...
so that we only need to perform the lookup and identifier resolution
once per identifier in the PCH file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-11 00:14:32 +00:00