Files
clang-p2996/clang/test/Modules/Inputs/macro-reexport/module.modulemap
Sean Silva 8b7c0398b6 [modules] PR20507: Avoid silent textual inclusion.
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
2015-08-17 16:39:30 +00:00

23 lines
468 B
Plaintext

module b {
module b2 { header "b2.h" export * }
module b1 { header "b1.h" export * }
}
module a {
module a1 { header "a1.h" export * }
module a2 { header "a2.h" export * }
}
module c {
module c1 { header "c1.h" export * }
}
module d {
module d1 { header "d1.h" export * }
module d2 { header "d2.h" export * }
}
module e {
module e1 { header "e1.h" export * }
module e2 { header "e2.h" export * }
}
module f {
module f1 { header "f1.h" export * }
}