2014-03-08 08:03:56 +08:00
|
|
|
module c_library [extern_c] { module inner { header "c-header.h" } }
|
2014-03-02 13:58:18 +08:00
|
|
|
module cxx_library { header "cxx-header.h" requires cplusplus }
|
|
|
|
module c_library_bad [extern_c] { header "c-header-bad.h" }
|
2011-11-17 07:02:25 +08:00
|
|
|
module diamond_top { header "diamond_top.h" }
|
2011-12-02 09:47:07 +08:00
|
|
|
module diamond_left {
|
|
|
|
header "diamond_left.h"
|
|
|
|
export diamond_top
|
|
|
|
}
|
|
|
|
module diamond_right {
|
|
|
|
header "diamond_right.h"
|
|
|
|
export diamond_top
|
|
|
|
}
|
|
|
|
module diamond_bottom {
|
|
|
|
header "diamond_bottom.h"
|
2011-12-06 01:28:06 +08:00
|
|
|
export *
|
2011-12-02 09:47:07 +08:00
|
|
|
}
|
2011-11-17 07:02:25 +08:00
|
|
|
module irgen { header "irgen.h" }
|
2014-03-22 09:43:32 +08:00
|
|
|
module cxx_irgen_top { header "cxx-irgen-top.h" }
|
|
|
|
module cxx_irgen_left { header "cxx-irgen-left.h" }
|
|
|
|
module cxx_irgen_right { header "cxx-irgen-right.h" }
|
2011-11-17 07:02:25 +08:00
|
|
|
module lookup_left_objc { header "lookup_left.h" }
|
|
|
|
module lookup_right_objc { header "lookup_right.h" }
|
|
|
|
module lookup_left_cxx { header "lookup_left.hpp" }
|
|
|
|
module lookup_right_cxx { header "lookup_right.hpp" }
|
|
|
|
module module_private_left { header "module_private_left.h" }
|
|
|
|
module module_private_right { header "module_private_right.h" }
|
2012-10-11 08:46:49 +08:00
|
|
|
module macros_top {
|
|
|
|
header "macros_top.h"
|
2014-03-06 11:16:27 +08:00
|
|
|
explicit module b { header "macros_top_b.h" }
|
|
|
|
explicit module c { header "macros_top_c.h" }
|
2012-10-11 08:46:49 +08:00
|
|
|
}
|
|
|
|
module macros_left {
|
|
|
|
header "macros_left.h"
|
|
|
|
export *
|
|
|
|
}
|
|
|
|
module macros_right {
|
|
|
|
header "macros_right.h"
|
|
|
|
export *
|
2012-10-12 08:16:50 +08:00
|
|
|
explicit module undef {
|
|
|
|
header "macros_right_undef.h"
|
|
|
|
}
|
2012-10-11 08:46:49 +08:00
|
|
|
}
|
2011-11-17 07:02:25 +08:00
|
|
|
module macros { header "macros.h" }
|
2014-03-01 08:08:04 +08:00
|
|
|
module macros_other { header "macros_other.h" }
|
2011-11-17 07:02:25 +08:00
|
|
|
module category_top { header "category_top.h" }
|
2011-12-03 04:08:44 +08:00
|
|
|
module category_left {
|
|
|
|
header "category_left.h"
|
|
|
|
export category_top
|
2013-01-17 07:00:23 +08:00
|
|
|
|
|
|
|
explicit module sub {
|
|
|
|
header "category_left_sub.h"
|
|
|
|
}
|
2011-12-03 04:08:44 +08:00
|
|
|
}
|
|
|
|
module category_right {
|
|
|
|
header "category_right.h"
|
|
|
|
export category_top
|
2013-01-17 07:00:23 +08:00
|
|
|
|
|
|
|
explicit module sub {
|
|
|
|
header "category_right_sub.h"
|
|
|
|
}
|
2011-12-03 04:08:44 +08:00
|
|
|
}
|
|
|
|
module category_bottom {
|
|
|
|
header "category_bottom.h"
|
|
|
|
export category_left
|
|
|
|
export category_right
|
|
|
|
}
|
2012-01-27 09:47:08 +08:00
|
|
|
module category_other { header "category_other.h" }
|
2011-11-17 07:02:25 +08:00
|
|
|
module redeclarations_left { header "redeclarations_left.h" }
|
|
|
|
module redeclarations_right { header "redeclarations_right.h" }
|
2012-04-12 15:56:21 +08:00
|
|
|
module redecl_namespaces_left { header "redecl_namespaces_left.h" }
|
|
|
|
module redecl_namespaces_right { header "redecl_namespaces_right.h" }
|
2011-11-17 07:02:25 +08:00
|
|
|
module load_failure { header "load_failure.h" }
|
2011-12-15 00:03:29 +08:00
|
|
|
|
|
|
|
module decldef {
|
|
|
|
explicit module Decl { header "decl.h" }
|
2011-12-16 11:12:41 +08:00
|
|
|
explicit module Decl2 { header "decl2.h" }
|
2011-12-15 00:03:29 +08:00
|
|
|
explicit module Def { header "def.h" }
|
Completely re-implement (de-)serialization of declaration
chains. The previous implementation relied heavily on the declaration
chain being stored as a (circular) linked list on disk, as it is in
memory. However, when deserializing from multiple modules, the
different chains could get mixed up, leading to broken declaration chains.
The new solution keeps track of the first and last declarations in the
chain for each module file. When we load a declaration, we search all
of the module files for redeclarations of that declaration, then
splice together all of the lists into a coherent whole (along with any
redeclarations that were actually parsed).
As a drive-by fix, (de-)serialize the redeclaration chains of
TypedefNameDecls, which had somehow gotten missed previously. Add a
test of this serialization.
This new scheme creates a redeclaration table that is fairly large in
the PCH file (on the order of 400k for Cocoa.h's 12MB PCH file). The
table is mmap'd in and searched via a binary search, but it's still
quite large. A future tweak will eliminate entries for declarations
that have no redeclarations anywhere, and should
drastically reduce the size of this table.
llvm-svn: 146841
2011-12-18 07:38:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module redecl_merge_top {
|
2011-12-21 02:11:52 +08:00
|
|
|
header "redecl-merge-top.h"
|
|
|
|
explicit module Explicit { header "redecl-merge-top-explicit.h" }
|
2012-11-16 03:47:16 +08:00
|
|
|
exclude header "nonexistent.h"
|
Completely re-implement (de-)serialization of declaration
chains. The previous implementation relied heavily on the declaration
chain being stored as a (circular) linked list on disk, as it is in
memory. However, when deserializing from multiple modules, the
different chains could get mixed up, leading to broken declaration chains.
The new solution keeps track of the first and last declarations in the
chain for each module file. When we load a declaration, we search all
of the module files for redeclarations of that declaration, then
splice together all of the lists into a coherent whole (along with any
redeclarations that were actually parsed).
As a drive-by fix, (de-)serialize the redeclaration chains of
TypedefNameDecls, which had somehow gotten missed previously. Add a
test of this serialization.
This new scheme creates a redeclaration table that is fairly large in
the PCH file (on the order of 400k for Cocoa.h's 12MB PCH file). The
table is mmap'd in and searched via a binary search, but it's still
quite large. A future tweak will eliminate entries for declarations
that have no redeclarations anywhere, and should
drastically reduce the size of this table.
llvm-svn: 146841
2011-12-18 07:38:30 +08:00
|
|
|
}
|
|
|
|
module redecl_merge_left {
|
|
|
|
header "redecl-merge-left.h"
|
|
|
|
export *
|
|
|
|
}
|
2011-12-23 03:44:59 +08:00
|
|
|
module redecl_merge_left_left {
|
|
|
|
header "redecl-merge-left-left.h"
|
|
|
|
export *
|
|
|
|
}
|
Completely re-implement (de-)serialization of declaration
chains. The previous implementation relied heavily on the declaration
chain being stored as a (circular) linked list on disk, as it is in
memory. However, when deserializing from multiple modules, the
different chains could get mixed up, leading to broken declaration chains.
The new solution keeps track of the first and last declarations in the
chain for each module file. When we load a declaration, we search all
of the module files for redeclarations of that declaration, then
splice together all of the lists into a coherent whole (along with any
redeclarations that were actually parsed).
As a drive-by fix, (de-)serialize the redeclaration chains of
TypedefNameDecls, which had somehow gotten missed previously. Add a
test of this serialization.
This new scheme creates a redeclaration table that is fairly large in
the PCH file (on the order of 400k for Cocoa.h's 12MB PCH file). The
table is mmap'd in and searched via a binary search, but it's still
quite large. A future tweak will eliminate entries for declarations
that have no redeclarations anywhere, and should
drastically reduce the size of this table.
llvm-svn: 146841
2011-12-18 07:38:30 +08:00
|
|
|
module redecl_merge_right {
|
|
|
|
header "redecl-merge-right.h"
|
|
|
|
export *
|
|
|
|
}
|
|
|
|
module redecl_merge_bottom {
|
2013-02-12 02:16:18 +08:00
|
|
|
explicit module prefix {
|
|
|
|
header "redecl-merge-bottom-prefix.h"
|
|
|
|
}
|
|
|
|
|
Completely re-implement (de-)serialization of declaration
chains. The previous implementation relied heavily on the declaration
chain being stored as a (circular) linked list on disk, as it is in
memory. However, when deserializing from multiple modules, the
different chains could get mixed up, leading to broken declaration chains.
The new solution keeps track of the first and last declarations in the
chain for each module file. When we load a declaration, we search all
of the module files for redeclarations of that declaration, then
splice together all of the lists into a coherent whole (along with any
redeclarations that were actually parsed).
As a drive-by fix, (de-)serialize the redeclaration chains of
TypedefNameDecls, which had somehow gotten missed previously. Add a
test of this serialization.
This new scheme creates a redeclaration table that is fairly large in
the PCH file (on the order of 400k for Cocoa.h's 12MB PCH file). The
table is mmap'd in and searched via a binary search, but it's still
quite large. A future tweak will eliminate entries for declarations
that have no redeclarations anywhere, and should
drastically reduce the size of this table.
llvm-svn: 146841
2011-12-18 07:38:30 +08:00
|
|
|
header "redecl-merge-bottom.h"
|
|
|
|
export *
|
|
|
|
}
|
2012-01-07 17:11:48 +08:00
|
|
|
module namespaces_top {
|
|
|
|
header "namespaces-top.h"
|
|
|
|
export *
|
|
|
|
}
|
|
|
|
module namespaces_left {
|
|
|
|
header "namespaces-left.h"
|
|
|
|
export *
|
|
|
|
}
|
|
|
|
module namespaces_right {
|
|
|
|
header "namespaces-right.h"
|
|
|
|
export *
|
|
|
|
}
|
2012-10-02 17:09:43 +08:00
|
|
|
module templates_top {
|
|
|
|
header "templates-top.h"
|
|
|
|
export *
|
|
|
|
}
|
|
|
|
module templates_left {
|
|
|
|
header "templates-left.h"
|
|
|
|
export *
|
|
|
|
}
|
|
|
|
module templates_right {
|
|
|
|
header "templates-right.h"
|
|
|
|
export *
|
|
|
|
}
|
2012-01-25 08:59:09 +08:00
|
|
|
module MethodPoolA {
|
|
|
|
header "MethodPoolA.h"
|
2013-01-17 02:47:38 +08:00
|
|
|
|
2013-02-08 03:13:24 +08:00
|
|
|
explicit module Sub2 {
|
|
|
|
header "MethodPoolASub2.h"
|
|
|
|
}
|
|
|
|
|
2013-01-17 02:47:38 +08:00
|
|
|
explicit module Sub {
|
|
|
|
header "MethodPoolASub.h"
|
|
|
|
}
|
2012-01-25 08:59:09 +08:00
|
|
|
}
|
|
|
|
module MethodPoolB {
|
|
|
|
header "MethodPoolB.h"
|
2013-01-17 02:47:38 +08:00
|
|
|
|
2013-06-21 08:20:25 +08:00
|
|
|
explicit module Sub2 {
|
|
|
|
header "MethodPoolBSub2.h"
|
|
|
|
}
|
|
|
|
|
2013-01-17 02:47:38 +08:00
|
|
|
explicit module Sub {
|
|
|
|
header "MethodPoolBSub.h"
|
|
|
|
}
|
2012-01-25 08:59:09 +08:00
|
|
|
}
|
2012-05-17 00:31:58 +08:00
|
|
|
module import_decl {
|
|
|
|
header "import-decl.h"
|
|
|
|
}
|
2012-11-07 03:39:40 +08:00
|
|
|
|
|
|
|
framework module * {
|
|
|
|
exclude NotAModule
|
|
|
|
}
|
2013-01-09 08:47:56 +08:00
|
|
|
|
|
|
|
module linkage_merge_left {
|
|
|
|
explicit module sub {
|
|
|
|
header "linkage-merge-sub.h"
|
|
|
|
}
|
|
|
|
}
|
2013-01-15 01:21:00 +08:00
|
|
|
|
|
|
|
module autolink {
|
|
|
|
header "autolink.h"
|
|
|
|
link "autolink"
|
|
|
|
|
|
|
|
explicit module sub {
|
|
|
|
header "autolink-sub.h"
|
|
|
|
link "autolink_sub"
|
|
|
|
}
|
|
|
|
|
|
|
|
explicit module sub2 {
|
|
|
|
header "autolink-sub2.h"
|
|
|
|
link framework "autolink_framework"
|
|
|
|
}
|
2014-01-31 09:06:56 +08:00
|
|
|
|
|
|
|
explicit module sub3 {
|
|
|
|
header "autolink-sub3.h"
|
|
|
|
link "autolink_from_pch"
|
|
|
|
}
|
2013-01-15 01:21:00 +08:00
|
|
|
}
|
2013-02-02 07:45:03 +08:00
|
|
|
|
|
|
|
module weird_objc {
|
|
|
|
header "weird_objc.h"
|
|
|
|
}
|
2013-02-07 06:40:31 +08:00
|
|
|
|
|
|
|
module ignored_macros {
|
|
|
|
header "ignored_macros.h"
|
|
|
|
}
|
2013-02-08 08:37:45 +08:00
|
|
|
|
|
|
|
module cxx_many_overloads {
|
|
|
|
header "cxx-many-overloads.h"
|
|
|
|
}
|
2013-02-12 10:32:35 +08:00
|
|
|
|
|
|
|
module cxx_inline_namespace {
|
|
|
|
header "cxx-inline-namespace.h"
|
|
|
|
}
|
2013-02-12 13:48:23 +08:00
|
|
|
|
|
|
|
module cxx_linkage_cache {
|
|
|
|
header "cxx-linkage-cache.h"
|
|
|
|
}
|
2013-03-20 08:22:05 +08:00
|
|
|
|
2013-06-25 09:25:15 +08:00
|
|
|
module cxx_templates_common {
|
|
|
|
header "cxx-templates-common.h"
|
|
|
|
}
|
|
|
|
|
2013-06-24 12:45:28 +08:00
|
|
|
module cxx_templates_a {
|
|
|
|
header "cxx-templates-a.h"
|
|
|
|
}
|
|
|
|
|
When we perform dependent name lookup during template instantiation, it's not
sufficient to only consider names visible at the point of instantiation,
because that may not include names that were visible when the template was
defined. More generally, if the instantiation backtrace goes through a module
M, then every declaration visible within M should be available to the
instantiation. Any of those declarations might be part of the interface that M
intended to export to a template that it instantiates.
The fix here has two parts:
1) If we find a non-visible declaration during name lookup during template
instantiation, check whether the declaration was visible from the defining
module of all entities on the active template instantiation stack. The defining
module is not the owning module in all cases: we look at the module in which a
template was defined, not the module in which it was first instantiated.
2) Perform pending instantiations at the end of a module, not at the end of the
translation unit. This is general goodness, since it significantly cuts down
the amount of redundant work that is performed in every TU importing a module,
and also implicitly adds the module containing the point of instantiation to
the set of modules checked for declarations in a lookup within a template
instantiation.
There's a known issue here with template instantiations performed while
building a module, if additional imports are added later on. I'll fix that
in a subsequent commit.
llvm-svn: 187167
2013-07-26 07:08:39 +08:00
|
|
|
module cxx_templates_b_impl {
|
|
|
|
header "cxx-templates-b-impl.h"
|
|
|
|
}
|
|
|
|
|
2013-06-24 12:45:28 +08:00
|
|
|
module cxx_templates_b {
|
|
|
|
header "cxx-templates-b.h"
|
|
|
|
}
|
|
|
|
|
2013-10-16 07:19:58 +08:00
|
|
|
module cxx_templates_c {
|
|
|
|
header "cxx-templates-c.h"
|
|
|
|
}
|
|
|
|
|
2013-07-14 10:01:48 +08:00
|
|
|
module cxx_decls {
|
|
|
|
module unimported {
|
|
|
|
header "cxx-decls-unimported.h"
|
|
|
|
}
|
|
|
|
module imported {
|
|
|
|
header "cxx-decls-imported.h"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-20 08:22:05 +08:00
|
|
|
module config {
|
|
|
|
header "config.h"
|
|
|
|
config_macros [exhaustive] WANT_FOO, WANT_BAR
|
|
|
|
}
|
2013-03-28 01:17:23 +08:00
|
|
|
|
|
|
|
module diag_pragma {
|
|
|
|
header "diag_pragma.h"
|
|
|
|
}
|
2013-04-04 07:06:26 +08:00
|
|
|
|
2013-08-30 08:23:29 +08:00
|
|
|
module dummy {
|
|
|
|
header "dummy.h"
|
|
|
|
}
|
|
|
|
|
2013-04-04 07:06:26 +08:00
|
|
|
module builtin {
|
|
|
|
header "builtin.h"
|
|
|
|
explicit module sub {
|
|
|
|
header "builtin_sub.h"
|
|
|
|
}
|
|
|
|
}
|
2013-04-04 12:40:17 +08:00
|
|
|
|
|
|
|
module linkage_merge {
|
|
|
|
explicit module foo {
|
|
|
|
header "linkage-merge-foo.h"
|
|
|
|
}
|
|
|
|
explicit module bar {
|
|
|
|
header "linkage-merge-bar.h"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2013-05-20 21:49:41 +08:00
|
|
|
|
|
|
|
module incomplete_mod {
|
|
|
|
header "incomplete_mod.h"
|
|
|
|
}
|
2013-06-22 00:28:10 +08:00
|
|
|
|
|
|
|
module warning {
|
|
|
|
header "warning.h"
|
|
|
|
}
|
2013-10-18 14:54:39 +08:00
|
|
|
|
|
|
|
module initializer_list {
|
|
|
|
header "initializer_list"
|
|
|
|
}
|
2013-10-23 10:17:46 +08:00
|
|
|
|
|
|
|
module using_decl {
|
|
|
|
module a { header "using-decl-a.h" export * }
|
|
|
|
module b { header "using-decl-b.h" export * }
|
|
|
|
}
|
2013-11-05 05:51:33 +08:00
|
|
|
|
|
|
|
module recursive_visibility_a1 {
|
|
|
|
module inner { header "recursive_visibility_a1_inner.h" }
|
|
|
|
}
|
|
|
|
module recursive_visibility_a2 {
|
|
|
|
module inner {
|
|
|
|
module more_inner {
|
|
|
|
header "recursive_visibility_a2_more_inner.h"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
module recursive_visibility_b {
|
|
|
|
header "recursive_visibility_b.h"
|
|
|
|
export *
|
|
|
|
}
|
|
|
|
module recursive_visibility_c {
|
|
|
|
header "recursive_visibility_c.h"
|
|
|
|
}
|
2014-03-06 04:51:45 +08:00
|
|
|
module recursive1 {
|
|
|
|
header "recursive1.h"
|
|
|
|
}
|
|
|
|
module recursive2 {
|
|
|
|
header "recursive2.h"
|
|
|
|
}
|