Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Bruno Cardoso Lopes via cfe-commits
bruno abandoned this revision. bruno added a comment. Hi Ben, Comment at: lib/Basic/FileManager.cpp:221-223 @@ -220,2 +220,5 @@ // See if there is already an entry in the map. + // FIXME: Note that when first requested, the returned file name equals to the + // requested

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Ben Langmuir via cfe-commits
benlangmuir added inline comments. Comment at: lib/Basic/FileManager.cpp:221-223 @@ -220,2 +220,5 @@ // See if there is already an entry in the map. + // FIXME: Note that when first requested, the returned file name equals to the + // requested path. This is not true when

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Hi Ben, Comment at: lib/Basic/FileManager.cpp:221-223 @@ -220,2 +220,5 @@ // See if there is already an entry in the map. + // FIXME: Note that when first requested, the returned file name equals to the + // requested path. This is not true when

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > From what I understand from > http://lists.llvm.org/pipermail/cfe-dev/2014-July/038273.html, changing the > behavior of the cached result has side-effects and demands a non trivial > change, am I assuming the right thing? Yes. Threading through the Filename

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-11 Thread Bruno Cardoso Lopes via cfe-commits
bruno updated this revision to Diff 53363. bruno added a comment. Hi Richard & Ben, Thanks for the review! I've attached a new patch and changed the approach: made findUsableModuleForHeader receive a FileName instead of FileEntry. Answering the questions below: FileManager::getFile returns

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-11 Thread Richard Smith via cfe-commits
rsmith added a comment. Can you find who's poisoning the `FileManager`'s idea of the name of the file with a full path to the VFS overlay and fix that? Comment at: lib/Lex/HeaderSearch.cpp:1163 @@ +1162,3 @@ +SmallString<256> RootName = StringRef(Root->getName()); +

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-11 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. This doesn't appear to be a safe change. We can't assume that `RootName` wouldn't ever be legitimately found somewhere in a path (even without a VFS) and changing the path prefix could give a completely different location. I would also be concerned about the

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-11 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Ping! http://reviews.llvm.org/D18849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-06 Thread Bruno Cardoso Lopes via cfe-commits
bruno created this revision. bruno added reviewers: rsmith, benlangmuir, klimek. bruno added subscribers: aprantl, dexonsmith, cfe-commits. The reproducer script (generated by the crash reproducer) invokes clang and tries to rebuild modules using the headers in the .cache/vfs directory. Depending