diff options
Diffstat (limited to 'lib/System/AIX/Path.cpp')
-rw-r--r-- | lib/System/AIX/Path.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/System/AIX/Path.cpp b/lib/System/AIX/Path.cpp index 117fbfb81b..e49a593bc8 100644 --- a/lib/System/AIX/Path.cpp +++ b/lib/System/AIX/Path.cpp @@ -31,6 +31,18 @@ Path::is_valid() const { return true; } +Path +Path::GetTemporaryDirectory() { + char pathname[MAXPATHLEN]; + strcpy(pathname,"/tmp/llvm_XXXXXX"); + 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!"); + return result; +} + } // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab |