[modules] PR20507: Avoid silent textual inclusion.Summary:If a module was unavailable (either a missing requirement on the modulebeing imported, or a missing file anywhere in the top-level module
[modules] PR20507: Avoid silent textual inclusion.Summary:If a module was unavailable (either a missing requirement on the modulebeing imported, or a missing file anywhere in the top-level module (andnot dominated by an unsatisfied `requires`)), we would silently treatinclusions as textual. This would cause all manner of crazy andconfusing errors (and would also silently "work" sometimes, making theproblem 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 atonce, but for now I've done things in a sort of awkward way.The changes to test/Modules/Inputs/declare-use/module.mapwere necessitated because the thing that was meant to be tested there(introduced in r197805) was predicated on silently falling back to textualinclusion, which we no longer do.The changes to test/Modules/Inputs/macro-reexport/module.modulemapare just an overlooked missing header that seems to have been missing sincethis code was committed (r213922), which is now caught.Reviewers: rsmith, benlangmuir, djasperSubscribers: cfe-commitsDifferential Revision: http://reviews.llvm.org/D10423llvm-svn: 245228
show more ...