| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
module map.
llvm-svn: 145695
|
|
|
|
|
|
|
| |
(sub)module is read from an AST file. This makes sure that the AST
writer knows how to map all modules to their global IDs.
llvm-svn: 145685
|
|
|
|
|
|
|
|
| |
only the macro definitions from visible (sub)modules will actually be
visible. This provides the same behavior for macros that r145640
provided for declarations.
llvm-svn: 145683
|
|
|
|
|
|
| |
module. When that module becomes visible, so do those declarations.
llvm-svn: 145640
|
|
|
|
|
|
|
| |
of that declaration, and encode the submodule ID in each declaration
stored in an AST file.
llvm-svn: 145555
|
|
|
|
|
|
|
|
| |
a standard global/local scheme, so that submodule definitions will
eventually be able to refer to submodules in other top-level
modules. We'll need this functionality soonish.
llvm-svn: 145549
|
|
|
|
|
|
|
|
|
| |
library, since modules cut across all of the libraries. Rename
serialization::Module to serialization::ModuleFile to side-step the
annoying naming conflict. Prune a bunch of ModuleMap.h includes that
are no longer needed (most files only needed the Module type).
llvm-svn: 145538
|
|
|
|
|
|
|
|
|
| |
submodules. This information will eventually be used for name hiding
when dealing with submodules. For now, we only use it to ensure that
the module "key" returned when loading a module will always be a
module (rather than occasionally being a FileEntry).
llvm-svn: 145497
|
|
|
|
|
|
| |
writer. No functionality change.
llvm-svn: 145479
|
|
|
|
|
|
|
|
|
|
| |
file in the source manager. This allows us to properly create and use
modules described by module map files without umbrella headers (or
with incompletely umbrella headers). More generally, we can actually
build a PCH file that makes use of file -> buffer remappings, which
could be useful in libclang in the future.
llvm-svn: 144830
|
|
|
|
|
|
| |
building modules.
llvm-svn: 144680
|
|
|
|
|
|
| |
introduces/redeclares a property.
llvm-svn: 144520
|
|
|
|
|
|
| |
should have been already emitted.
llvm-svn: 144519
|
|
|
|
|
|
|
|
|
| |
HeaderFileInfos
from the primary PCH is deserialized, otherwise we lose info that headers were
already #imported/#included.
llvm-svn: 144510
|
|
|
|
| |
llvm-svn: 144505
|
|
|
|
|
|
|
|
| |
[is/set]ChangedSinceDeserialization
and remove them.
llvm-svn: 144466
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of its categories because
it is going to be rewritten (and the chain will be serialized again), otherwise we may form a cycle in its
categories list when deserializing.
Also introduce ASTMutationListener::CompletedObjCForwardRef to notify that a forward reference
was completed; using Decl's isChangedSinceDeserialization/setChangedSinceDeserialization
is bug inducing and kinda gross, we should phase it out.
Fixes infinite loop in rdar://10418538.
llvm-svn: 144465
|
|
|
|
|
|
|
|
|
| |
that it retains source location information for the type. Aside from
general goodness (being able to walk the types described in that
information), we now have a proper representation for dependent
delegating constructors. Fixes PR10457 (for real).
llvm-svn: 143410
|
|
|
|
|
|
| |
make sure that we keep track of locations of replaced decls as well.
llvm-svn: 143341
|
|
|
|
|
|
|
| |
Currently sorting by raw source location does work as intended but who knows
what may change in the future..
llvm-svn: 143256
|
|
|
|
|
|
| |
if we are not interested in the decl.
llvm-svn: 143255
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a FILE_SORTED_DECLS [de]serialization record that contains
a file sorted array of file-level DeclIDs in a PCH/Module.
The rationale is to allow "targeted" deserialization of decls inside
a range of a source file.
Cocoa PCH increased by 0.8%
Difference of creation time for Cocoa PCH is below the noise level.
llvm-svn: 143238
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AST file more lazy, so that we don't eagerly load that information for
all known identifiers each time a new AST file is loaded. The eager
reloading made some sense in the context of precompiled headers, since
very few identifiers were defined before PCH load time. With modules,
however, a huge amount of code can get parsed before we see an
@import, so laziness becomes important here.
The approach taken to make this information lazy is fairly simple:
when we load a new AST file, we mark all of the existing identifiers
as being out-of-date. Whenever we want to access information that may
come from an AST (e.g., whether the identifier has a macro definition,
or what top-level declarations have that name), we check the
out-of-date bit and, if it's set, ask the AST reader to update the
IdentifierInfo from the AST files. The update is a merge, and we now
take care to merge declarations before/after imports with declarations
from multiple imports.
The results of this optimization are fairly dramatic. On a small
application that brings in 14 non-trivial modules, this takes modules
from being > 3x slower than a "perfect" PCH file down to 30% slower
for a full rebuild. A partial rebuild (where the PCH file or modules
can be re-used) is down to 7% slower. Making the PCH file just a
little imperfect (e.g., adding two smallish modules used by a bunch of
.m files that aren't in the PCH file) tips the scales in favor of the
modules approach, with 24% faster partial rebuilds.
This is just a first step; the lazy scheme could possibly be improved
by adding versioning, so we don't search into modules we already
searched. Moreover, we'll need similar lazy schemes for all of the
other lookup data structures, such as DeclContexts.
llvm-svn: 143100
|
|
|
|
|
|
|
| |
public. Add a __private_macro__ directive to hide a macro, similar to
the __module_private__ declaration specifier.
llvm-svn: 142188
|
|
|
|
|
|
|
| |
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
|
|
|
|
|
|
|
|
| |
committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.
Thanks to Jeffrey Yasskin for the thorough review!
llvm-svn: 141330
|
|
|
|
|
|
| |
- Also, spell const_iterator as const_iterator.
llvm-svn: 140765
|
|
|
|
|
|
|
| |
storing mappings with that instead of straying some magic constants about the
source.
llvm-svn: 140760
|
|
|
|
| |
llvm-svn: 140478
|
|
|
|
| |
llvm-svn: 140367
|
|
|
|
|
|
| |
we already have the range in the PPEntityOffsets array.
llvm-svn: 140209
|
|
|
|
|
|
| |
and don't store the ID for each preprocessed entity.
llvm-svn: 140208
|
|
|
|
|
|
| |
don't store an extra location for it.
llvm-svn: 140190
|
|
|
|
|
|
|
|
|
|
| |
PreprocessingRecord's getPreprocessedEntitiesInRange.
Also remove all the stuff that were added in ASTUnit that are unnecessary now
that we do a binary search for preprocessed entities and deserialize only
what is necessary.
llvm-svn: 140063
|
|
|
|
|
|
| |
return iterators for local, non-loaded, preprocessed entities.
llvm-svn: 140062
|
|
|
|
|
|
|
|
|
|
| |
which will do a binary search and return a pair of iterators
for preprocessed entities in the given source range.
Source ranges of preprocessed entities are stored twice currently in
the PCH/Module file but this will be fixed in a subsequent commit.
llvm-svn: 140058
|
|
|
|
|
|
|
|
|
| |
arbitrary amount of code. This forces us to stage the AST writer more
strictly, ensuring that we don't assign a declaration ID to a
declaration until after we're certain that no more modules will get
loaded.
llvm-svn: 139974
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Use an array of offsets for all preprocessed entities
-Get rid of the separate array of offsets for just macro definitions;
for references to macro definitions use an index inside the preprocessed
entities array.
-Deserialize each preprocessed entity lazily, at first request; not in bulk.
Paves the way for binary searching of preprocessed entities that will offer
efficiency and will simplify things on the libclang side a lot.
llvm-svn: 139809
|
|
|
|
|
|
| |
non-exported macro, for real this time
llvm-svn: 139745
|
|
|
|
| |
llvm-svn: 139734
|
|
|
|
|
|
| |
dealing with non-exported macros
llvm-svn: 139731
|
|
|
|
|
|
| |
non-exported macro
llvm-svn: 139728
|
|
|
|
|
|
|
| |
should no longer have the serialization of LangOptions out of sync
with the structure itself (yay).
llvm-svn: 139613
|
|
|
|
|
|
|
|
|
|
| |
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
llvm-svn: 139605
|
|
|
|
| |
llvm-svn: 139600
|
|
|
|
| |
llvm-svn: 139430
|
|
|
|
|
|
|
|
| |
declaration was deserialized from an AST file. Use this instead of
Decl::getPCHLevel() wherever possible. This is a simple step toward
killing off Decl::getPCHLevel().
llvm-svn: 139427
|
|
|
|
|
|
| |
for a builtin macro expansion.
llvm-svn: 139298
|
|
|
|
|
|
|
|
|
|
| |
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.
llvm-svn: 139275
|
|
|
|
|
|
|
| |
needed for implicit move constructors and move assignment
operators. Fixes PR10847.
llvm-svn: 139144
|