<div dir="rtl"><div dir="ltr">Hi Rafael,</div><div dir="ltr"><br></div><div dir="ltr">Please see</div><div dir="ltr">  <a href="http://llvm.org/viewvc/llvm-project?view=revision&revision=215290">http://llvm.org/viewvc/llvm-project?view=revision&revision=215290</a></div>

<div dir="ltr"><br></div><div dir="ltr">If you can test on Linux without NormalizedPath logic, the whole code section may be deleted.<br></div><div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div>

<div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2014-08-09 0:35 GMT+03:00 Rafael Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span>:</div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Fri Aug  8 16:35:52 2014<br>
New Revision: 215243<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=215243&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=215243&view=rev</a><br>
Log:<br>
Remove dead code. Fixes pr20544.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/Support/FileSystem.h<br>
    llvm/trunk/lib/Support/Unix/Path.inc<br>
    llvm/trunk/lib/Support/Windows/Path.inc<br>
    llvm/trunk/unittests/Support/Path.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/Support/FileSystem.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileSystem.h?rev=215243&r1=215242&r2=215243&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileSystem.h?rev=215243&r1=215242&r2=215243&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/include/llvm/Support/FileSystem.h (original)<br>
+++ llvm/trunk/include/llvm/Support/FileSystem.h Fri Aug  8 16:35:52 2014<br>
@@ -276,14 +276,6 @@ private:<br>
 ///          platform-specific error_code.<br>
 std::error_code make_absolute(SmallVectorImpl<char> &path);<br>
<br>
-/// @brief Normalize path separators in \a Path<br>
-///<br>
-/// If the path contains any '\' separators, they are transformed into '/'.<br>
-/// This is particularly useful when cross-compiling Windows on Linux, but is<br>
-/// safe to invoke on Windows, which accepts both characters as a path<br>
-/// separator.<br>
-std::error_code normalize_separators(SmallVectorImpl<char> &Path);<br>
-<br>
 /// @brief Create all the non-existent directories in path.<br>
 ///<br>
 /// @param path Directories to create.<br>
<br>
Modified: llvm/trunk/lib/Support/Unix/Path.inc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=215243&r1=215242&r2=215243&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=215243&r1=215242&r2=215243&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/lib/Support/Unix/Path.inc (original)<br>
+++ llvm/trunk/lib/Support/Unix/Path.inc Fri Aug  8 16:35:52 2014<br>
@@ -272,19 +272,6 @@ std::error_code create_directory(const T<br>
   return std::error_code();<br>
 }<br>
<br>
-std::error_code normalize_separators(SmallVectorImpl<char> &Path) {<br>
-  for (auto PI = Path.begin(), PE = Path.end(); PI < PE; ++PI) {<br>
-    if (*PI == '\\') {<br>
-      auto PN = PI + 1;<br>
-      if (PN < PE && *PN == '\\')<br>
-        ++PI; // increment once, the for loop will move over the escaped slash<br>
-      else<br>
-        *PI = '/';<br>
-    }<br>
-  }<br>
-  return std::error_code();<br>
-}<br>
-<br>
 // Note that we are using symbolic link because hard links are not supported by<br>
 // all filesystems (SMB doesn't).<br>
 std::error_code create_link(const Twine &to, const Twine &from) {<br>
<br>
Modified: llvm/trunk/lib/Support/Windows/Path.inc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=215243&r1=215242&r2=215243&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=215243&r1=215242&r2=215243&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/lib/Support/Windows/Path.inc (original)<br>
+++ llvm/trunk/lib/Support/Windows/Path.inc Fri Aug  8 16:35:52 2014<br>
@@ -163,11 +163,6 @@ std::error_code create_directory(const T<br>
   return std::error_code();<br>
 }<br>
<br>
-std::error_code normalize_separators(SmallVectorImpl<char> &Path) {<br>
-  (void) Path;<br>
-  return std::error_code();<br>
-}<br>
-<br>
 // We can't use symbolic links for windows.<br>
 std::error_code create_link(const Twine &to, const Twine &from) {<br>
   // Get arguments.<br>
<br>
Modified: llvm/trunk/unittests/Support/Path.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Path.cpp?rev=215243&r1=215242&r2=215243&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Path.cpp?rev=215243&r1=215242&r2=215243&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/unittests/Support/Path.cpp (original)<br>
+++ llvm/trunk/unittests/Support/Path.cpp Fri Aug  8 16:35:52 2014<br>
@@ -640,22 +640,22 @@ TEST(Support, NormalizePath) {<br>
   SmallString<64> Path5("\\a");<br>
   SmallString<64> Path6("a\\");<br>
<br>
-  ASSERT_NO_ERROR(fs::normalize_separators(Path1));<br>
+  path::native(Path1);<br>
   EXPECT_PATH_IS(Path1, "a", "a");<br>
<br>
-  ASSERT_NO_ERROR(fs::normalize_separators(Path2));<br>
+  path::native(Path2);<br>
   EXPECT_PATH_IS(Path2, "a/b", "a/b");<br>
<br>
-  ASSERT_NO_ERROR(fs::normalize_separators(Path3));<br>
+  path::native(Path3);<br>
   EXPECT_PATH_IS(Path3, "a\\b", "a/b");<br>
<br>
-  ASSERT_NO_ERROR(fs::normalize_separators(Path4));<br>
+  path::native(Path4);<br>
   EXPECT_PATH_IS(Path4, "a\\\\b", "a\\\\b");<br>
<br>
-  ASSERT_NO_ERROR(fs::normalize_separators(Path5));<br>
+  path::native(Path5);<br>
   EXPECT_PATH_IS(Path5, "\\a", "/a");<br>
<br>
-  ASSERT_NO_ERROR(fs::normalize_separators(Path6));<br>
+  path::native(Path6);<br>
   EXPECT_PATH_IS(Path6, "a\\", "a/");<br>
<br>
 #undef EXPECT_PATH_IS<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>