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

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 11 14:10:22 PDT 2016


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());
+    path::remove_dots(RootName, true/*remove_dot_dot*/);
+    auto Pos = FileName.find(RootName);
----------------
remove_dot_dot=true is not a correct transformation to do to a path and can result in the wrong file being found.


http://reviews.llvm.org/D18849





More information about the cfe-commits mailing list