[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-08-28 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. andrewjcg requested review of this revision. In some build environments/systems, flags for explicit module map files may be propagated up to dependents which may not choose to enable use of modu

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-08-28 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Andrew, thanks for improving this. I think this makes sense: dependents can choose to not use modules without having to trigger the build system to rebuild all dependencies. Can you add a simple testcase to prove the point of the change? Comment at:

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-08-28 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg added a comment. > Can you add a simple testcase to prove the point of the change? Yup, will do! Comment at: clang/lib/Frontend/FrontendAction.cpp:814 +CI.getPreprocessor().getHeaderSearchInfo().loadModuleMapFile( +*File, /*IsSystem*/ false); +

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-08-28 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Herald added a subscriber: danielkiss. How about a malformed module map is not loaded and gives no errors? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86802/new/ https://reviews.llvm.org/D86802 _

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-08-28 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg added a comment. > How about a malformed module map is not loaded and gives no errors? Heh yeah, was thinking the same :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86802/new/ https://reviews.llvm.org/D86802 _

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-08-28 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:814 +CI.getPreprocessor().getHeaderSearchInfo().loadModuleMapFile( +*File, /*IsSystem*/ false); + else andrewjcg wrote: > bruno wrote: > > Is this clang-format

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-08-28 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg updated this revision to Diff 288695. andrewjcg added a comment. add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86802/new/ https://reviews.llvm.org/D86802 Files: clang/lib/Frontend/FrontendAction.cpp clang/test/Modules/Inputs

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-09-01 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: clang/test/Modules/explicit-module-maps.cpp:4 + +// RUN: %clang_cc1 -fmodule-map-file=%S/Inputs/explicit-module-maps/invalid.modulemap -verify %s +// expected-no-diagnostics Minor suggestion here given the content of the

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-09-01 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg updated this revision to Diff 289236. andrewjcg added a comment. simplify test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86802/new/ https://reviews.llvm.org/D86802 Files: clang/lib/Frontend/FrontendAction.cpp clang/test/Modules/e

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-09-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. Sorry for not noticing this review earlier. We can't make this change. Module map files are still useful and still used even when modules are disabled -- they power the undeclared in

[PATCH] D86802: [Modules] Don't parse/load explicit module maps if modules are disabled

2020-09-01 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg abandoned this revision. andrewjcg added a comment. Ahh, I see, make sense. The motivating issue was due to an apparent bug where realpaths in umbrella dir support for module map files get leaked into dep files for includes starting with `..` (e.g. `#include "../foo.h"`) in non-modula