For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/System/Win32/Win32.h b/lib/System/Win32/Win32.h
index 7243548..2238faa 100644
--- a/lib/System/Win32/Win32.h
+++ b/lib/System/Win32/Win32.h
@@ -44,14 +44,15 @@
throw s;
}
-inline void MakeErrMsg(std::string* ErrMsg, const std::string& prefix) {
+inline bool MakeErrMsg(std::string* ErrMsg, const std::string& prefix) {
if (!ErrMsg)
- return;
+ return true;
char *buffer = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), 0, (LPSTR)&buffer, 1, NULL);
ErrMsg = prefix + buffer;
LocalFree(buffer);
+ return true;
}
inline void ThrowErrno(const std::string& prefix) {