summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-15 17:21:57 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-15 17:21:57 +0000
commit1ae165636366448b978676605ca9fbe052dcffba (patch)
treeea8667b5c4743b86a2685bda95431d984088e519 /llvm/lib/System
parentb96afe4b7e675fe5abf0d1b4ec097df0e1ff3766 (diff)
downloadbcm5719-llvm-1ae165636366448b978676605ca9fbe052dcffba.tar.gz
bcm5719-llvm-1ae165636366448b978676605ca9fbe052dcffba.zip
Provide the ThrowErrno utility.
Patch contributed by Morten Ofstad llvm-svn: 17827
Diffstat (limited to 'llvm/lib/System')
-rw-r--r--llvm/lib/System/Win32/Win32.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/System/Win32/Win32.h b/llvm/lib/System/Win32/Win32.h
index fb2c7e96fdf..ab6b3c2b498 100644
--- a/llvm/lib/System/Win32/Win32.h
+++ b/llvm/lib/System/Win32/Win32.h
@@ -31,3 +31,6 @@ inline void ThrowError(const std::string& msg) {
throw s;
}
+inline void ThrowErrno(const std::string& prefix) {
+ ThrowError(prefix + ": " + strerror(errno));
+}
OpenPOWER on IntegriCloud