Fix a bug where directory names of length one or less where not set
[oota-llvm.git] / lib / System / Darwin / Path.cpp
index 165bbc64b5ee24457293cbe8d01088aef87b05fd..ed391079487c9cfff8e87a965ff8e9e34e3e085a 100644 (file)
@@ -23,7 +23,7 @@ namespace llvm {
 using namespace sys;
 
 bool 
-Path::is_valid() const {
+Path::isValid() const {
   if (path.empty()) 
     return false;
   if (path.length() >= MAXPATHLEN)
@@ -38,11 +38,16 @@ Path::GetTemporaryDirectory() {
   if (0 == mkdtemp(pathname))
     ThrowErrno(std::string(pathname) + ": Can't create temporary directory");
   Path result;
-  result.set_directory(pathname);
-  assert(result.is_valid() && "mkdtemp didn't create a valid pathname!");
+  result.setDirectory(pathname);
+  assert(result.isValid() && "mkdtemp didn't create a valid pathname!");
   return result;
 }
 
+std::string
+Path::GetDLLSuffix() {
+  return "dylib";
+}
+
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab