Sebastian Redl
60876431b1
Correctly initialize Reader to null.
...
llvm-svn: 107994
2010-07-09 17:53:32 +00:00
Sebastian Redl
f525a30d19
Really respect -chained-pch.
...
llvm-svn: 107993
2010-07-09 17:40:12 +00:00
Douglas Gregor
8ed0c0b99d
Introduce -f{no-}spell-checking options to enable/disable
...
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.
llvm-svn: 107992
2010-07-09 17:35:33 +00:00
Sebastian Redl
f4b0c4b946
Add a frontend option -chained-pch and don't pass an active PCH reader to the PCH writer if it is not set, preventing creation of chained PCH files. Since the reader is so far unused, effectively no functionality change.
...
llvm-svn: 107936
2010-07-09 00:00:58 +00:00
Sebastian Redl
595c51342c
Some preparatory work for chained PCH. No functionality change.
...
llvm-svn: 107915
2010-07-08 22:01:51 +00:00
Argyrios Kyrtzidis
7e8996c7e6
Introduce PCHReader::GetTranslationUnitDecl() and use it instead of ReadDeclRecord when initializing.
...
ReadDeclRecord would hit assertion if the translation unit declaration was already loaded during
IdentifierInfo initialization.
llvm-svn: 107885
2010-07-08 17:13:02 +00:00
Argyrios Kyrtzidis
9f2d24a808
Support TemplateTemplateParmDecl for PCH.
...
llvm-svn: 107884
2010-07-08 17:12:57 +00:00
Argyrios Kyrtzidis
a4ed18191c
For TagType and TemplateSpecializationType, isDependent calculation may be 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.
llvm-svn: 107873
2010-07-08 13:09:53 +00:00
Argyrios Kyrtzidis
1985bb3b10
Read/write the C++ parts of DeclRefExpr and MemberExpr for PCH.
...
llvm-svn: 107872
2010-07-08 13:09:47 +00:00
Argyrios Kyrtzidis
00dda6accc
Fix reading of UsingDecl from PCH.
...
llvm-svn: 107871
2010-07-08 13:09:41 +00:00
Douglas Gregor
747eb7840a
Reinstate the fix for PR7556. A silly use of isTrivial() was
...
suppressing copies of objects with trivial copy constructors.
llvm-svn: 107857
2010-07-08 06:14:04 +00:00
Douglas Gregor
e182370eda
Revert r107828 and r107827, the fix for PR7556, which seems to be
...
breaking bootstrap on Linux.
llvm-svn: 107837
2010-07-07 23:37:33 +00:00
Douglas Gregor
6df2b8c3ac
Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
...
newly-narrowed scope. No functionality change.
llvm-svn: 107828
2010-07-07 22:43:56 +00:00
Chris Lattner
3e2ee147d0
add driver support for minix, patch by Kees van Reeuwijk
...
from PR7583
llvm-svn: 107788
2010-07-07 16:01:42 +00:00
Argyrios Kyrtzidis
ad65c6926b
Fix broken reading of NestedNameSpecifiers from PCH.
...
llvm-svn: 107784
2010-07-07 15:46:30 +00:00
Argyrios Kyrtzidis
903ccd6121
Delay passing InterestingDecls to the Consumer until when we know we are not in recursive loading and the
...
declarations are fully initialized.
llvm-svn: 107783
2010-07-07 15:46:26 +00:00
Argyrios Kyrtzidis
46f556d4e5
Simplify code. FunctionDecl and ObjCMethodDecl have some common interfaces.
...
llvm-svn: 107769
2010-07-07 11:31:23 +00:00
Tom Care
3ff08a8e76
Added a path-sensitive idempotent operation checker (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.
...
Example:
{
int a = 1;
int b = 5;
int c = b / a; // a is 1 on all paths
}
- New IdempotentOperationChecker class
- Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
- Minor refactoring of SVal to allow checking for any integer
- Added command line option for check
- Added basic test cases
llvm-svn: 107706
2010-07-06 21:43:29 +00:00
Duncan Sands
1614396b15
Pacify versions of gcc that think these variables may be used
...
uninitialized (which doesn't seem to be the case), by giving
them arbitrary initial values.
llvm-svn: 107679
2010-07-06 18:19:40 +00:00
Argyrios Kyrtzidis
39fdf81b43
Read/write function template specializations for PCH, properly this time.
...
llvm-svn: 107665
2010-07-06 15:37:09 +00:00
Argyrios Kyrtzidis
af2eac2869
Add to PCH missing Sema information about VTable uses and dynamic classes.
...
llvm-svn: 107664
2010-07-06 15:37:04 +00:00
Argyrios Kyrtzidis
181431cd91
Allow a CXXRecordDecl to get a DefinitionData pointer even when its owner is still initializing.
...
llvm-svn: 107663
2010-07-06 15:36:58 +00:00
Argyrios Kyrtzidis
282b36b7f6
Read/write instantiated-from-member of EnumDecl for PCH.
...
llvm-svn: 107662
2010-07-06 15:36:48 +00:00
Argyrios Kyrtzidis
a95d019150
Read/write the identifier namespace in PCH for decls that may modify it.
...
We can now use a PCH'ed <map>.
llvm-svn: 107617
2010-07-05 10:38:01 +00:00
Argyrios Kyrtzidis
927d8e06c1
Read/write some source location for PCH.
...
llvm-svn: 107616
2010-07-05 10:37:55 +00:00
Argyrios Kyrtzidis
b5fcdc21c2
Fix a regression of a previous commit of mine (rdar://8158953).
...
Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading.
Introduce more suitable ASTContext::getRecordType() and getEnumType().
llvm-svn: 107598
2010-07-04 21:44:47 +00:00
Argyrios Kyrtzidis
6685e8a747
Read/write more information of ASTContext for PCH. Overriden methods and instantiated-from information.
...
llvm-svn: 107597
2010-07-04 21:44:35 +00:00
Argyrios Kyrtzidis
e862cbc5f6
Don't try to install the __[u]int128_t identifier if it is already installed 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.
llvm-svn: 107595
2010-07-04 21:44:19 +00:00
Argyrios Kyrtzidis
ccde6a02c8
Write/read ParmVarDecl's UninstantiatedDefaultArg for PCH.
...
llvm-svn: 107594
2010-07-04 21:44:07 +00:00
Argyrios Kyrtzidis
cdb8b3f7ec
Read/write specialization info of static data members for PCH.
...
llvm-svn: 107593
2010-07-04 21:44:00 +00:00
Argyrios Kyrtzidis
dae2a1607e
When setting the anonymous namespace at PCH reading, it may still be initializing so avoid
...
the invariant checks at NamespaceDecl::setAnonymousNamespace().
llvm-svn: 107566
2010-07-03 07:57:53 +00:00
Douglas Gregor
9672f92f7f
Lazily declare default constructors. We now delay the construction of
...
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>.
llvm-svn: 107551
2010-07-03 00:47:00 +00:00
Douglas Gregor
a6d695057c
Lazily declare implicit copy constructors.
...
llvm-svn: 107543
2010-07-02 23:41:54 +00:00
Argyrios Kyrtzidis
3701fcd759
Read/write CastExpr's CXXBaseSpecifierArray for PCH.
...
llvm-svn: 107542
2010-07-02 23:30:27 +00:00
Argyrios Kyrtzidis
4259ebcdac
Fix broken PCH support for CXXDefaultArgExpr.
...
llvm-svn: 107541
2010-07-02 23:30:15 +00:00
Douglas Gregor
330b9cff74
Lazily declare copy-assignment operators.
...
llvm-svn: 107521
2010-07-02 21:50:04 +00:00
Douglas Gregor
7454c563f1
Lazily declare the implicitly-declared destructor in a C++ class.
...
llvm-svn: 107510
2010-07-02 20:37:36 +00:00
Argyrios Kyrtzidis
335751610e
Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.
...
<vector> header can be used correctly through PCH now.
llvm-svn: 107483
2010-07-02 15:58:43 +00:00
Argyrios Kyrtzidis
373a83abdc
Fix reading FunctionDecls from PCH.
...
llvm-svn: 107477
2010-07-02 11:55:40 +00:00
Argyrios Kyrtzidis
e23371e71d
Fix reading ClassTemplateDecl's ClassTemplateSpecializationDecls and ClassTemplatePartialSpecializationDecls.
...
Store/read also their template arguments because they may be initializing and not be able to provide them.
llvm-svn: 107476
2010-07-02 11:55:37 +00:00
Argyrios Kyrtzidis
2c2167ac3d
Fully read/write CXXRecordDecl for PCH.
...
llvm-svn: 107475
2010-07-02 11:55:32 +00:00
Argyrios Kyrtzidis
e929095f4a
Fix reading of DependentNameType.
...
llvm-svn: 107474
2010-07-02 11:55:24 +00:00
Argyrios Kyrtzidis
dab33c5d33
Allow reading of InjectedClassNameType from PCH even when its decl is currently initializing.
...
llvm-svn: 107473
2010-07-02 11:55:20 +00:00
Argyrios Kyrtzidis
ee776bcb7a
Fix broken reading of member pointer from PCH.
...
llvm-svn: 107472
2010-07-02 11:55:15 +00:00
Argyrios Kyrtzidis
45a83f9acc
- Allow a typedef type to be read from PCH even if its decl is currently initializing.
...
- Fix creation of TemplateSpecializationType.
llvm-svn: 107471
2010-07-02 11:55:11 +00:00
Argyrios Kyrtzidis
e3029a7e7b
Fix broken reading of "#lines" from PCH.
...
llvm-svn: 107470
2010-07-02 11:55:05 +00:00
Argyrios Kyrtzidis
318b0e78c6
Generally types expect an initialized TypeDecl; its safer and less complicated to delay PCH reading the type of a TypeDecl.
...
llvm-svn: 107469
2010-07-02 11:55:01 +00:00
Argyrios Kyrtzidis
39f0e308c4
Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.
...
llvm-svn: 107468
2010-07-02 11:54:55 +00:00
Daniel Dunbar
bb7ac52e02
Driver/IRgen: Add support for -momit-leaf-frame-pointer.
...
llvm-svn: 107367
2010-07-01 01:31:45 +00:00
Argyrios Kyrtzidis
bd8ac8cf07
Fix PCH support for UnresolvedUsingTypenameDecl and UnresolvedUsingValueDecl.
...
llvm-svn: 107268
2010-06-30 08:49:30 +00:00