[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-11-17 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. Also, to add to my previous comment, even if for a moment we ignore the header dependencies and when they are extracted, a modern build system normally tracks other kinds of what can be called "auxiliary dependency information": some form of compiler signature,

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-11-04 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Hi Richard, Thanks for still entertaining the idea. Yes, I believe, in order to support modules (TS) the build system will have to extract module (and header while at it) dependency information prior to compilation rather than as a byproduct of compilation (which is how

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-11-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I'm still unconvinced that this mechanism is worth supporting. The use case of putting this information into .d files doesn't make sense to me. .d files are generally outputs of prior compilations, whereas this information is a compilation input, needed in every

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-11-03 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-10-27 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-10-20 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-10-13 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-10-09 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-29 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-25 Thread Boris Kolpackov via Phabricator via cfe-commits
boris updated this revision to Diff 116442. boris added a comment. Another attempt to upload a clean diff (also rebased on latest HEAD). https://reviews.llvm.org/D37299 Files: docs/Modules.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-25 Thread Boris Kolpackov via Phabricator via cfe-commits
boris updated this revision to Diff 116438. boris marked an inline comment as done. boris added a comment. New revision this time with the tests (which got dropped from the earlier revision diff for some reason). https://reviews.llvm.org/D37299 Files: docs/Modules.rst

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-25 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Yes, the main "feature" of this approach compared to @file is the ability to reuse an already existing file to store this information. Most build systems that support C/C++ compilation have to store auxiliary dependency information at least for the extracted header

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I wonder whether this feature really pulls its weight compared to using `@file` and prepending `-fmodule-file=` to each line. The big difference between this patch and an `@file` seems to be the filtering by prefix / storing this information as a subset of the data in a

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-22 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Boris, This is a handy option, very nice. Can you also add testcases? Comment at: lib/Frontend/CompilerInvocation.cpp:1561 + + auto Buf = FileMgr.getBufferForFile(File); + if (!Buf) { `auto Buf` -> `auto *Buf`

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-15 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-08 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-04 Thread Boris Kolpackov via Phabricator via cfe-commits
boris updated this revision to Diff 113779. boris marked an inline comment as done. boris added a comment. New patch revision with David's comments addressed. https://reviews.llvm.org/D37299 Files: docs/Modules.rst include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-04 Thread Boris Kolpackov via Phabricator via cfe-commits
boris marked 3 inline comments as done. boris added a comment. David, thanks for the review. Uploading the new revision (also rebased on HEAD). Comment at: lib/Frontend/CompilerInvocation.cpp:1576 + StringRef Str = Buf.get()->getBuffer(); + for (size_t B(0), E(B); B <

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Couple of drive by comments - no doubt Richard will have a more in depth review, but figured this might save a round or two. Comment at: lib/Frontend/CompilerInvocation.cpp:1561-1565 + if (File.empty()) + { +

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-08-30 Thread Boris Kolpackov via Phabricator via cfe-commits
boris created this revision. Add the -fmodule-file-map=[=] option which can be used to specify a file that contains module name to precompiled modules files mapping, similar to -fmodule-file==. The can be used to only consider certain lines which can be useful if we want to store the mapping