summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Unix.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-23 07:30:48 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-23 07:30:48 +0000
commit879ed5ab9c372c5bd42fab8dcdf78628aa479639 (patch)
treeb547dd5eb998653fa46593578ea5bf440305e6be /llvm/lib/System/Unix/Unix.h
parentbd156a901d4e06bfb18b8468607689f1bbec5aae (diff)
downloadbcm5719-llvm-879ed5ab9c372c5bd42fab8dcdf78628aa479639.tar.gz
bcm5719-llvm-879ed5ab9c372c5bd42fab8dcdf78628aa479639.zip
For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its users correspondingly. llvm-svn: 29843
Diffstat (limited to 'llvm/lib/System/Unix/Unix.h')
-rw-r--r--llvm/lib/System/Unix/Unix.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/System/Unix/Unix.h b/llvm/lib/System/Unix/Unix.h
index 1516d453dd9..0f9b96adca0 100644
--- a/llvm/lib/System/Unix/Unix.h
+++ b/llvm/lib/System/Unix/Unix.h
@@ -123,10 +123,10 @@ inline void ThrowErrno(const std::string& prefix, int errnum = -1) {
/// string and the Unix error number given by \p errnum. If errnum is -1, the
/// default then the value of errno is used.
/// @brief Make an error message
-inline void MakeErrMsg(
+inline bool MakeErrMsg(
std::string* ErrMsg, const std::string& prefix, int errnum = -1) {
if (!ErrMsg)
- return;
+ return true;
char buffer[MAXPATHLEN];
buffer[0] = 0;
if (errnum == -1)
@@ -148,6 +148,7 @@ inline void MakeErrMsg(
sprintf(buffer, "Error #%d", errnum);
#endif
*ErrMsg = buffer;
+ return true;
}
#endif
OpenPOWER on IntegriCloud