add a new static method to portably determine whether a patch is
[oota-llvm.git] / lib / System / Unix / Path.inc
index d5edee1b03b3ec29a78a4857806b9bacb288aa34..1f73571cf140ba350d6efd80735d6169f774b6eb 100644 (file)
@@ -103,6 +103,14 @@ Path::isValid() const {
   return i >= len;
 }
 
+bool
+Path::isAbsolute(const char *NameStart, unsigned NameLen) {
+  assert(NameStart);
+  if (NameLen == 0)
+    return false;
+  return NameStart[0] == '/';
+}
+
 bool
 Path::isAbsolute() const {
   if (path.empty())