| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
When -fmodule-format is set to "obj", emit debug info for all types
declared in a module or referenced by a declaration into the module's
object file container.
This patch adds support for C and C++ types.
llvm-svn: 247049
|
|
|
|
| |
llvm-svn: 246702
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r246546, with a workaround for an MSVC 2013 miscompile and an MSVC 2015
rejects-valid.
Original commit message:
[modules] Rework serialized DeclContext lookup table management. Instead of
walking the loaded ModuleFiles looking for lookup tables for the context, store
them all in one place, and merge them together if we find we have too many
(currently, more than 4). If we do merge, include the merged form in our
serialized lookup table, so that downstream readers never need to look at our
imports' tables.
This gives a huge performance improvement to builds with very large numbers of
modules (in some cases, more than a 2x speedup was observed).
llvm-svn: 246582
|
|
|
|
|
|
|
|
|
|
|
| |
avoid merge conflicts). It broke the build on MSVC 2015. It also broke an MSVC 2013 bot with testing issues.
llvm\tools\clang\lib\serialization\MultiOnDiskHashTable.h(117):
error C2065: 'Files': undeclared identifier
http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/2917
llvm-svn: 246546
|
|
|
|
|
|
|
|
| |
predictable diagnostic experience. The hash-of-DeclID order we were using
before gave different results on Win32 due to a different predefined
declaration of __builtin_va_list.
llvm-svn: 246521
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
walking the loaded ModuleFiles looking for lookup tables for the context, store
them all in one place, and merge them together if we find we have too many
(currently, more than 4). If we do merge, include the merged form in our
serialized lookup table, so that downstream readers never need to look at our
imports' tables.
This gives a huge performance improvement to builds with very large numbers of
modules (in some cases, more than a 2x speedup was observed).
llvm-svn: 246497
|
|
|
|
|
|
|
| |
unnecessary in C++ modules (where we don't need the identifiers for their
Decls) and expensive.
llvm-svn: 245821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
all modules and reduce the number of declarations we load when loading a
redeclaration chain.
The new approach is:
* when loading the first declaration of an entity within a module file, we
first load all declarations of the entity that were imported into that
module file, and then load all the other declarations of that entity from
that module file and build a suitable decl chain from them
* when loading any other declaration of an entity, we first load the first
declaration from the same module file
As before, we complete redecl chains through name lookup where necessary.
To make this work, I also had to change the way that template specializations
are stored -- it no longer suffices to track only canonical specializations; we
now emit all "first local" declarations when emitting a list of specializations
for a template.
On one testcase with several thousand imported module files, this reduces the
total runtime by 72%.
llvm-svn: 245779
|
|
|
|
| |
llvm-svn: 245391
|
|
|
|
|
|
|
|
| |
context is the class itself but lookups should be performed starting with the
lookup parent of the class (class and base members don't shadow types from the
surrounding context because they have not been declared yet).
llvm-svn: 245236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
If a module was unavailable (either a missing requirement on the module
being imported, or a missing file anywhere in the top-level module (and
not dominated by an unsatisfied `requires`)), we would silently treat
inclusions as textual. This would cause all manner of crazy and
confusing errors (and would also silently "work" sometimes, making the
problem difficult to track down).
I'm really not a fan of the `M->isAvailable(getLangOpts(), getTargetInfo(),
Requirement, MissingHeader)` function; it seems to do too many things at
once, but for now I've done things in a sort of awkward way.
The changes to test/Modules/Inputs/declare-use/module.map
were necessitated because the thing that was meant to be tested there
(introduced in r197805) was predicated on silently falling back to textual
inclusion, which we no longer do.
The changes to test/Modules/Inputs/macro-reexport/module.modulemap
are just an overlooked missing header that seems to have been missing since
this code was committed (r213922), which is now caught.
Reviewers: rsmith, benlangmuir, djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10423
llvm-svn: 245228
|
|
|
|
|
|
|
| |
the produced pcm file for stable file creation across distributed build
systems.
llvm-svn: 245199
|
|
|
|
|
|
| |
when building with implicit modules disabled.
llvm-svn: 245136
|
|
|
|
|
|
|
|
|
|
|
| |
It is flaky due to inability to remove files with open handles. We
could paper over it with rm -f, but then the file would still be
present.
This is more evidence to me that we should roll our own 'rm'
implementation in LLVM.
llvm-svn: 245083
|
|
|
|
|
|
|
|
|
|
|
| |
file in the .pcm files. This allows a smaller set of files to be sent to a
remote build worker when building with explicit modules (for instance, module
map files need not be sent along with the corresponding precompiled modules).
This doesn't actually make the embedded files visible to header search, so
it's not useful as a packaging format for public header files.
llvm-svn: 245028
|
|
|
|
|
|
|
|
| |
via a module map found by -fmodule-map-file=, the home directory of the module
is the current working directory, even if that's a different directory on
reload.
llvm-svn: 244988
|
|
|
|
|
|
| |
module files.
llvm-svn: 244931
|
|
|
|
| |
llvm-svn: 244927
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
files: include the .pcm file itself in the .d output, rather than including its
own input files. Other forms of module file continue to be transparent for .d
output.
Arguably, the input files for the .pcm file are still inputs to the
compilation, but that's unnecessary for make-like build systems (where the
mtime of the .pcm file is sufficient) and harmful for smarter build systems
that know about module files and want to track only the local dependencies.
llvm-svn: 244923
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This preserves backwards compatibility for two hacks in the Darwin
system module map files:
1. The use of 'requires excluded' to make headers non-modular, which
should really be mapped to 'textual' now that we have this feature.
2. Silently removes a bogus cplusplus requirement from IOKit.avc.
Once we start diagnosing missing requirements and headers on
auto-imports these would have broken compatibility with existing Darwin
SDKs.
llvm-svn: 244912
|
|
|
|
|
|
| |
across modules.
llvm-svn: 244714
|
|
|
|
|
|
|
|
| |
emit lexical contents for a declaration for another module. Track which module
those contents came from, and ensure that we only grab the lexical contents
from a single such instantiation.
llvm-svn: 244682
|
|
|
|
|
|
| |
module cache for this build.
llvm-svn: 244547
|
|
|
|
|
|
| |
corresponding include location (those specified on the command line).
llvm-svn: 244538
|
|
|
|
| |
llvm-svn: 244427
|
|
|
|
|
|
| |
particular, this avoids the need to re-parse module map files when using such a module.
llvm-svn: 244416
|
|
|
|
|
|
| |
in the unit test that was checking a file the test no longer creates.
llvm-svn: 244415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the module"
This was failing tests on a bunch of bots:
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/29919/steps/check-all
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29627/steps/check-all
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/9959/
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/5591/
This reverts r244412
llvm-svn: 244414
|
|
|
|
|
|
| |
current compilation, not just those from imported modules.
llvm-svn: 244413
|
|
|
|
|
|
|
|
|
|
| |
build process when we implicitly build a module. Previously, we'd create the
specified .d file once for each implicitly-built module and then finally
overwrite it with the correct contents after the requested build completes.
(This fails if you use stdout as a dependency file, which is what the provided
testcase does, and is how I discovered this brokenness.)
llvm-svn: 244412
|
|
|
|
| |
llvm-svn: 244410
|
|
|
|
|
|
|
|
| |
arguments because the reloaded form might have become non-canonical across the
serialization/deserialization step (this particularly happens when the
canonical form of the type involves an expression).
llvm-svn: 244409
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... and add aarch32 to specifically refer to the 32-bit ones.
Previously, 'arm' meant only 32-bit architectures and there was no way
for a module to build with both 32 and 64 bit ARM architectures.
Now a module that is intended to work on both architectures can specify
requires arm
whereas a module only for 32-bit platforms can say
requires aarch32
and just like before, 64-bit only can say
requires aarch64
llvm-svn: 244306
|
|
|
|
|
|
| |
the same anonymous union is defined across multiple modules.
llvm-svn: 243940
|
|
|
|
|
|
|
|
|
| |
-working-directory option is set, results in error.
The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>'
rdar://21330027
llvm-svn: 243718
|
|
|
|
|
|
|
|
|
|
| |
These tests were creating a modules.idx file in my clang checkout, not
the build directory or temp.
All the other tests in this directory use -fmodules-cache-path=%t so
updated these to match.
llvm-svn: 243657
|
|
|
|
|
|
|
| |
I think I was isolating the failure in the last RUN: line during
development, and forgot to re-enable the others.
llvm-svn: 243624
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also fix completely broken and untested code which was hiding the
primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op.
I ran into this in the wild. It was causing failures in our SDK build.
Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this
is a step in the right direction, and fixes an obviously broken case.
In some sense the test case I've added here is an integration test. We
should have these routines thoroughly unit tested in llvm::sys::fs.
llvm-svn: 243597
|
|
|
|
|
|
|
|
|
|
| |
UsingShadowDecls over other declarations of the same entity in the lookup
results. This ensures that we build correct redeclaration chains for the
UsingShadowDecls (otherwise we could see assertions and other misbehavior in
modules builds, when merging combines multiple redeclaration chains for the
same entity from the same module into one chain).
llvm-svn: 243592
|
|
|
|
|
|
|
|
|
|
|
| |
more modules are added: visit modules depth-first rather than breadth-first.
The visitation is still (approximately) oldest-to-newest, and still guarantees
that a module is visited before anything it imports, so modules that are
imported by others sometimes need to jump to a later position in the visitation
order when more modules are loaded, but independent module trees don't
interfere with each other any more.
llvm-svn: 242863
|
|
|
|
|
|
|
|
|
| |
the identifier table. This is redundant, since the TU-scope lookups are also
serialized as part of the TU DeclContext, and wasteful in a number of ways. We
still emit the decls for PCH / preamble builds, since for those we want
identical results, not merely semantically equivalent ones.
llvm-svn: 242855
|
|
|
|
|
|
|
| |
module cache has been provided, rather than creating one in the current
directory.
llvm-svn: 242819
|
|
|
|
|
|
| |
inserts a leading space into its output. Just check for a matching number anywhere in the output.
llvm-svn: 242661
|
|
|
|
|
|
| |
when the template is declared in a namespace.
llvm-svn: 242653
|
|
|
|
|
|
|
| |
to be interesting just because they are the name of a builtin. Reduces the size
of an empty module by over 80% (~100KB).
llvm-svn: 242650
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- introduces a new cc1 option -fmodule-format=[raw,obj]
with 'raw' being the default
- supports arbitrary module container formats that libclang is agnostic to
- adds the format to the module hash to avoid collisions
- splits the old PCHContainerOperations into PCHContainerWriter and
a PCHContainerReader.
Thanks to Richard Smith for reviewing this patch!
llvm-svn: 242499
|
|
|
|
|
|
|
|
|
|
|
| |
We referred to all declaration in definitions in our diagnostic messages
which is can be inaccurate. Instead, classify the declaration and emit
an appropriate diagnostic for the new declaration and an appropriate
note pointing to the old one.
This fixes PR24116.
llvm-svn: 242190
|
|
|
|
| |
llvm-svn: 242109
|
|
|
|
|
|
| |
module' declarations, show how we got to that module map file.
llvm-svn: 242105
|
|
|
|
|
|
|
|
|
|
|
| |
And make the module unavailable without breaking any parent modules.
If there's a missing requirement after we've already seen a missing
header, still update the IsMissingRequiement bit correctly. Also,
diagnose missing requirements before missing headers, since the
existence of the header is moot if there are missing requirements.
llvm-svn: 242055
|