clayborg added inline comments.

================
Comment at: source/Utility/FileSpec.cpp:105
+//------------------------------------------------------------------
+bool needsNormalization(const llvm::StringRef &path) {
+  for (auto i = path.find('/'); i != llvm::StringRef::npos;
----------------
I only want to scan the string one time. This will return true if this contains 
relative redundancies or extra slashes, not if the path is relative. "./foo" 
doesn't need normalization and this will return false, but "foo/." would need 
to be normalized to "foo", as well as "foo/./bar" and "foo/../bar". So this 
function is doing something completely different than the LLVM counterparts


================
Comment at: source/Utility/FileSpec.cpp:107
+  for (auto i = path.find('/'); i != llvm::StringRef::npos;
+       i = path.find('/', i + 1)) {
+    const auto nextChar = safeCharAtIndex(path, i+1);
----------------
no as the only caller to this function switches the slashes to '/' already..


https://reviews.llvm.org/D45977



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

Reply via email to