[llvm-commits] CVS: llvm/lib/System/Win32/Path.inc

Reid Spencer reid at x10sys.com
Tue Aug 22 15:46:55 PDT 2006



Changes in directory llvm/lib/System/Win32:

Path.inc updated: 1.51 -> 1.52
---
Log message:

Update for changes in Path class interface for exception removal.


---
Diffs of the changes:  (+6 -16)

 Path.inc |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)


Index: llvm/lib/System/Win32/Path.inc
diff -u llvm/lib/System/Win32/Path.inc:1.51 llvm/lib/System/Win32/Path.inc:1.52
--- llvm/lib/System/Win32/Path.inc:1.51	Tue Aug  1 13:16:02 2006
+++ llvm/lib/System/Win32/Path.inc	Tue Aug 22 17:46:39 2006
@@ -108,13 +108,16 @@
 static Path *TempDirectory = NULL;
 
 Path
-Path::GetTemporaryDirectory() {
+Path::GetTemporaryDirectory(std::string* ErrMsg) {
   if (TempDirectory)
     return *TempDirectory;
 
   char pathname[MAX_PATH];
-  if (!GetTempPath(MAX_PATH, pathname))
-    throw std::string("Can't determine temporary directory");
+  if (!GetTempPath(MAX_PATH, pathname)) {
+    if (ErrMsg)
+      *ErrMsg = "Can't determine temporary directory";
+    return Path();
+  }
 
   Path result;
   result.set(pathname);
@@ -134,19 +137,6 @@
   return *TempDirectory;
 }
 
-Path::Path(const std::string& unverified_path)
-  : path(unverified_path)
-{
-  FlipBackSlashes(path);
-  if (unverified_path.empty())
-    return;
-  if (this->isValid())
-    return;
-  // oops, not valid.
-  path.clear();
-  throw std::string(unverified_path + ": path is not valid");
-}
-
 // FIXME: the following set of functions don't map to Windows very well.
 Path
 Path::GetRootDirectory() {






More information about the llvm-commits mailing list