| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
that PTH always pulls in the source pages with -fsyntax-only (investigating further).
llvm-svn: 61996
|
|
|
|
|
|
|
|
|
| |
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.
llvm-svn: 61994
|
|
|
|
|
|
|
|
|
| |
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.
llvm-svn: 61988
|
|
|
|
| |
llvm-svn: 61970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rewrite @class declarations that showed up within linkage
specifications because those @class declarations never made it any
place where the rewriter could find them.
Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
live in the appropriate top-level or transparent DeclContext near the
top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
declarations now show up in a traversal of the declarations in a
DeclContext (they didn't before!). This way, the rewriter finds all
Objective-C declarations within linkage specifications.
llvm-svn: 61966
|
|
|
|
| |
llvm-svn: 61963
|
|
|
|
|
|
| |
character after each cached string.
llvm-svn: 61962
|
|
|
|
|
|
| |
after the spelling to accomodate sanity checking in LiteralSuppoert.cpp.
llvm-svn: 61956
|
|
|
|
|
|
|
| |
are related to setter syntax under -Wreadonly-setter-attrs
to prevent warnings in projects built with gcc.
llvm-svn: 61953
|
|
|
|
|
|
|
|
| |
Convert clients to use the standard getDeclContext() API.
Doug, thanks for the review!
llvm-svn: 61935
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.
This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.
llvm-svn: 61929
|
|
|
|
| |
llvm-svn: 61910
|
|
|
|
|
|
| |
file. For Cocoa.h, this enlarges the PTH file by 310K (4%).
llvm-svn: 61909
|
|
|
|
|
|
| |
of the PTH generation data structures. No functionality change.
llvm-svn: 61902
|
|
|
|
|
|
| |
would be called after a SourceManager was 'cleared', so it printed bogus results. Moreover, these stats are already printed earlier in the code path.
llvm-svn: 61825
|
|
|
|
| |
llvm-svn: 61786
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.
Only enumerations and linkage specifications currently use transparent
DeclContexts.
Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.
llvm-svn: 61735
|
|
|
|
| |
llvm-svn: 61534
|
|
|
|
| |
llvm-svn: 61456
|
|
|
|
|
|
| |
actually do anything with the template arguments, but they'll be used to create template declarations
llvm-svn: 61413
|
|
|
|
| |
llvm-svn: 61384
|
|
|
|
|
|
|
| |
- This reduces the PTH size for Cocoa.h by 7%.
- The increases PTH -Eonly speed for Cocoa.h by 0.8%.
llvm-svn: 61377
|
|
|
|
|
|
|
|
| |
- Encode the token length with 2 bytes instead of 4.
- This reduces the size of the .pth file for Cocoa.h by 12%.
- This speeds up PTH time (-Eonly) on Cocoa.h by 1.6%.
llvm-svn: 61364
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Embed 'eom' tokens in PTH file.
- Use embedded 'eom' tokens to not lazily generate them in the PTHLexer.
This means that PTHLexer can always advance to the next token after
reading a token (instead of buffering tokens using a copy).
- Moved logic of 'ReadToken' into Lex. GetToken & ReadToken no longer exist.
- These changes result in a 3.3% speedup (-Eonly) on Cocoa.h.
- The code is a little gross. Many cleanups are possible and should be done.
llvm-svn: 61360
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.
This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.
Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.
llvm-svn: 61357
|
|
|
|
|
|
| |
rewriting @selector?.
llvm-svn: 61351
|
|
|
|
|
|
| |
us to measure the effect of this optimization.
llvm-svn: 61319
|
|
|
|
| |
llvm-svn: 61312
|
|
|
|
| |
llvm-svn: 61309
|
|
|
|
| |
llvm-svn: 61135
|
|
|
|
|
|
| |
Fixes. PR clang/3220
llvm-svn: 61116
|
|
|
|
| |
llvm-svn: 61115
|
|
|
|
| |
llvm-svn: 61113
|
|
|
|
| |
llvm-svn: 61110
|
|
|
|
| |
llvm-svn: 61108
|
|
|
|
|
|
| |
parameter type in preamble
llvm-svn: 61088
|
|
|
|
|
|
| |
Convert a few functions.
llvm-svn: 60983
|
|
|
|
|
|
| |
of Block_destroy.
llvm-svn: 60962
|
|
|
|
|
|
|
| |
Only use major part of OS version when on darwin and modifying OS part
of target triple.
llvm-svn: 60957
|
|
|
|
|
|
| |
#elseinformation as well.
llvm-svn: 60955
|
|
|
|
|
|
|
| |
- Added a side-table per each token-cached file with the preprocessor conditional stack. This tracks what #if's are matched with what #endifs and where their respective tokens are in the PTH file. This will allow for quick skipping of excluded conditional branches in the Preprocessor.
- Performance testing shows the addition of this information (without actually utilizing it) leads to no performance regressions.
llvm-svn: 60911
|
|
|
|
| |
llvm-svn: 60899
|
|
|
|
|
|
| |
Found while investigating <rdar://problem/6435837> clang ObjC rewriter: use Block_release instead of Block_destroy.
llvm-svn: 60898
|
|
|
|
|
|
| |
Block_private.h or come up with #define to prevent double-definition
llvm-svn: 60890
|
|
|
|
|
|
| |
blocks don't work together
llvm-svn: 60887
|
|
|
|
|
|
| |
RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.
llvm-svn: 60883
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).
* Implement C++ qualified name lookup in terms of lookup into
DeclContext.
* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)
* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.
* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).
* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).
llvm-svn: 60878
|
|
|
|
|
|
| |
rewriter: crash rewriting file with Blocks and properties
llvm-svn: 60839
|
|
|
|
|
|
|
|
| |
Blocks and properties
More fancy footwork to cope with rewriting property 'setters'.
llvm-svn: 60760
|
|
|
|
| |
llvm-svn: 60732
|