diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-08-25 21:37:17 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-08-25 21:37:17 +0000 |
commit | 05545755676b9ff35d244e55d749a15e28bb228b (patch) | |
tree | 1319237959c931cf8fe384f7b4ca1277bf32e938 /lib/System/Win32/Win32.h | |
parent | dcea1400738e85a5cddbf91093983c593c323a19 (diff) | |
download | external_llvm-05545755676b9ff35d244e55d749a15e28bb228b.tar.gz external_llvm-05545755676b9ff35d244e55d749a15e28bb228b.tar.bz2 external_llvm-05545755676b9ff35d244e55d749a15e28bb228b.zip |
For PR797:
Make the Win32 code exception free (untested/uncompiled) which forced some
interface changes which had ripple effect. This should be the last of 797.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32/Win32.h')
-rw-r--r-- | lib/System/Win32/Win32.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/System/Win32/Win32.h b/lib/System/Win32/Win32.h index 2238faa848..0180bfabcf 100644 --- a/lib/System/Win32/Win32.h +++ b/lib/System/Win32/Win32.h @@ -24,26 +24,6 @@ #include <cassert> #include <string> -inline bool GetError(const std::string &Prefix, std::string *Dest) { - if (Dest == 0) return true; - char *buffer = NULL; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, - NULL, GetLastError(), 0, (LPSTR)&buffer, 1, NULL); - *Dest = Prefix + buffer; - LocalFree(buffer); - return true; -} - -inline void ThrowError(const std::string& msg) { - char *buffer = NULL; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, - NULL, GetLastError(), 0, (LPSTR)&buffer, 1, NULL); - std::string s(msg); - s += buffer; - LocalFree(buffer); - throw s; -} - inline bool MakeErrMsg(std::string* ErrMsg, const std::string& prefix) { if (!ErrMsg) return true; @@ -55,10 +35,6 @@ inline bool MakeErrMsg(std::string* ErrMsg, const std::string& prefix) { return true; } -inline void ThrowErrno(const std::string& prefix) { - ThrowError(prefix + ": " + strerror(errno)); -} - inline void MakeErrnoMsg(std::string* ErrMsg, const std::string & prefix) { MakeErrorMsg(prefix + ": " + strerror(errno)); } |