[llvm-commits] [llvm] r75421 - /llvm/trunk/lib/System/Unix/Path.inc
Chris Lattner
sabre at nondot.org
Sun Jul 12 12:01:16 PDT 2009
Author: lattner
Date: Sun Jul 12 14:01:16 2009
New Revision: 75421
URL: http://llvm.org/viewvc/llvm-project?rev=75421&view=rev
Log:
"UNIX paths can contain non-ASCII characters, so Path::isValid() should not reject paths with such characters in them. The attached patch removes the check from Path::isValid()."
patch by Benjamin Kramer!
Modified:
llvm/trunk/lib/System/Unix/Path.inc
Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=75421&r1=75420&r2=75421&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Sun Jul 12 14:01:16 2009
@@ -92,15 +92,7 @@
// Check some obvious things
if (path.empty())
return false;
- else if (path.length() >= MAXPATHLEN)
- return false;
-
- // Check that the characters are ascii chars
- size_t len = path.length();
- unsigned i = 0;
- while (i < len && isascii(path[i]))
- ++i;
- return i >= len;
+ return path.length() < MAXPATHLEN;
}
bool
More information about the llvm-commits
mailing list