benlangmuir accepted this revision.
benlangmuir added a comment.
This revision is now accepted and ready to land.

LGTM if you fix 256->PATH_MAX.


================
Comment at: lib/Frontend/ModuleDependencyCollector.cpp:66
@@ +65,3 @@
+#ifdef HAVE_REALPATH
+  char CanonicalPath[256];
+
----------------
Please use PATH_MAX.

================
Comment at: lib/Frontend/ModuleDependencyCollector.cpp:126-128
@@ -71,1 +125,5 @@
+  SmallString<256> RealPath;
+  bool HasSymLinkComponent = HasDotDotInPath &&
+                             getRealPath(AbsoluteSrc, RealPath) &&
+                             !StringRef(CanonicalPath).equals(RealPath);
 
----------------
How about "HasRemovedSymlinkComponent" to make it clear this is only for 
symlinks followed by ".."?

================
Comment at: test/Modules/crash-vfs-path-symlink-component.m:16
@@ +15,3 @@
+// RUN: %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
+// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
+
----------------
Maybe add indentation after the RUN: to make it easier to see that the command 
is wrapped?


http://reviews.llvm.org/D17104



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to