diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-22 22:46:39 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-22 22:46:39 +0000 |
| commit | 7e73c5135120f5788d86c57b8fa1d41aca4c543e (patch) | |
| tree | fb63c925643b2a4dd09ff311b0a4373b48ab479e /llvm/lib/System | |
| parent | e9a405685d0f1c4124c1f029c1ebaa870b9fe0fa (diff) | |
| download | bcm5719-llvm-7e73c5135120f5788d86c57b8fa1d41aca4c543e.tar.gz bcm5719-llvm-7e73c5135120f5788d86c57b8fa1d41aca4c543e.zip | |
Update for changes in Path class interface for exception removal.
llvm-svn: 29834
Diffstat (limited to 'llvm/lib/System')
| -rw-r--r-- | llvm/lib/System/Win32/Path.inc | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/llvm/lib/System/Win32/Path.inc b/llvm/lib/System/Win32/Path.inc index 8bc39f498db..b40318fe27c 100644 --- a/llvm/lib/System/Win32/Path.inc +++ b/llvm/lib/System/Win32/Path.inc @@ -108,13 +108,16 @@ Path::isValid() const { 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 @@ Path::GetTemporaryDirectory() { 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() { |

