diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-22 19:01:30 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-22 19:01:30 +0000 |
commit | 487447626c273962744820a370d93ddef961c3f2 (patch) | |
tree | 5452a7c4f1d9d37faf155d7e486719795ae96023 /include/llvm/System | |
parent | be4f88a8b8bb3311e0dc4cde8533763d7923c3ea (diff) | |
download | external_llvm-487447626c273962744820a370d93ddef961c3f2.zip external_llvm-487447626c273962744820a370d93ddef961c3f2.tar.gz external_llvm-487447626c273962744820a370d93ddef961c3f2.tar.bz2 |
Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
adjust users of it to compensate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r-- | include/llvm/System/Path.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index ef946f1..8bc8eb8 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -97,10 +97,11 @@ namespace sys { /// a "standard" place for the operating system. The directory is /// guaranteed to be created on exit from this function. If the directory /// cannot be created, the function will throw an exception. - /// @throws std::string indicating why the directory could not be created. + /// @returns an invalid path (empty) on error + /// @param ErrMsg Optional place for an error message if an error occurs /// @brief Constrct a path to an new, unique, existing temporary /// directory. - static Path GetTemporaryDirectory(); + static Path GetTemporaryDirectory(std::string* ErrMsg); /// Construct a vector of sys::Path that contains the "standard" system /// library paths suitable for linking into programs. This function *must* @@ -171,7 +172,7 @@ namespace sys { /// @throws std::string if \p unverified_path is not legal. /// @param unverified_path The path to verify and assign. /// @brief Construct a Path from a string. - explicit Path(const std::string& unverified_path); + explicit Path(const std::string& p) : path(p) {} /// @} /// @name Operators |