| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
|
|
|
|
|
|
|
|
|
|
|
| |
include guards don't show up as macro definitions in every translation
unit that imports a module. Macro definitions can, however, be
exported with the intentionally-ugly #__export_macro__
directive. Implement this feature by not even bothering to serialize
non-exported macros to a module, because clients of that module need
not (should not) know that these macros even exist.
llvm-svn: 138943
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initial incentive was to fix a crash when PCH chaining categories
to an interface, but the fix was done in the "modules way" that I hear
is popular with the kids these days.
Each module stores the local chain of categories and we combine them
when the interface is loaded. We also warn if non-dependent modules
introduce duplicate named categories.
llvm-svn: 138926
|
|
|
|
| |
llvm-svn: 138855
|
|
|
|
|
|
|
|
| |
sure that all of the CXXConversionDecls go into the same
bucket. Otherwise, name lookup might not find them all. Fixes
<rdar://problem/10041960>.
llvm-svn: 138824
|
|
|
|
|
|
|
| |
Empty lookups can occur in the DeclContext map when we are chaining PCHs, where
the empty lookup indicates that we already looked in ExternalASTSource.
llvm-svn: 138816
|
|
|
|
|
|
| |
option is ObjCInferRelatedResultType.
llvm-svn: 138793
|
|
|
|
|
|
|
|
|
|
| |
table when serializing an AST file. This was a holdover from the days
before chained PCH, and is a complete waste of time and storage
now. It's a good thing it's useless, because I have no idea how I
would have implemented MaterializeVisibleDecls efficiently in the
presence of modules.
llvm-svn: 138496
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently getMacroArgExpandedLocation is very inefficient and for the case
of a location pointing at the main file it will end up checking almost all of
the SLocEntries. Make it faster:
-Use a map of macro argument chunks to their expanded source location. The map
is for a single source file, it's stored in the file's ContentCache and lazily
computed, like the source lines cache.
-In SLocEntry's FileInfo add an 'unsigned NumCreatedFIDs' field that keeps track
of the number of FileIDs (files and macros) that were created during preprocessing
of that particular file SLocEntry. This is useful when computing the macro argument
map in skipping included files while scanning for macro arg FileIDs that lexed from
a specific source file. Due to padding, the new field does not increase the size
of SLocEntry.
llvm-svn: 138225
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-import-module) vs. loaded because some other module depends on
them. As part of doing this, pass down the module that caused a module
to be loaded directly, rather than assuming that we're loading a
chain. Finally, write out all of the directly-loaded modules when
serializing an AST file (using the new IMPORTS record), so that an AST
file can depend on more than one other AST file, all of which will be
loaded when that AST file is loaded. This allows us to form and load a
tree of modules, but we can't yet load a DAG of modules.
llvm-svn: 137923
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all AST files have a normal METADATA record that has the same form
regardless of whether we refer to a chained PCH or any other kind of
AST file.
Introduce the IMPORTS record, which describes all of the AST files
that are imported by this AST file, and how (as a module, a PCH file,
etc.). Currently, we emit at most one entry to this record, to support
chained PCH.
llvm-svn: 137869
|
|
|
|
|
|
| |
a macro arg expansion or not.
llvm-svn: 137792
|
|
|
|
|
|
|
| |
in the AST format, which are built lazily by the ASTContext when
requested.
llvm-svn: 137437
|
|
|
|
|
|
|
| |
AST file format, lazily generating the actual declaration in
ASTContext as needed.
llvm-svn: 137434
|
|
|
|
|
|
|
| |
AST file format, lazily generating the actual declaration in
ASTContext as needed.
llvm-svn: 137431
|
|
|
|
|
|
|
|
|
| |
type over into the AST context, then make that declaration a
predefined declaration in the AST format. This ensures that different
AST files will at least agree on the (global) declaration ID for 'id',
and eliminates one of the "special" types in the AST file format.
llvm-svn: 137429
|
|
|
|
|
|
|
|
| |
eliminating a pile of redundant code (and probably some bugs in the
process). The variation between chained and non-chained PCH is fairly
small now anyway.
llvm-svn: 137410
|
|
|
|
|
|
|
|
|
|
| |
declaration that never actually gets serialized. Instead, serialize
the various kinds of update records (lexical decls, visible decls, the
addition of an anonymous namespace) for the translation unit, even if
we're not chaining. This way, we won't have to deal with multiple
loaded translation unit declarations.
llvm-svn: 137395
|
|
|
|
|
|
| |
Objective-C types
llvm-svn: 137366
|
|
|
|
|
|
| |
the C++0x 'constexpr' keyword.
llvm-svn: 137230
|
|
|
|
|
|
|
|
| |
enumerations from the ASTContext into CodeGen, so that we don't need
to serialize it to AST files. This appears to be the last of the
low-hanging fruit for SpecialTypes.
llvm-svn: 137124
|
|
|
|
|
|
|
| |
types to AST files; they're only used by debug info generation anyway,
and shouldn't ever exist in the AST anyway.
llvm-svn: 137122
|
|
|
|
|
|
|
|
| |
layout of a constant NSString from the ASTContext over to CodeGen,
since this is solely CodeGen's responsibility. Eliminates one of the
unnecessary "special" types that we serialize.
llvm-svn: 137121
|