summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/system_error.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-09 17:36:48 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-09 17:36:48 +0000
commit7b6fef82d43a4e121a284ebabf5de94c3485b29a (patch)
tree09a49a4bb8f4c8c8b5a13d4d328b82f442a26969 /llvm/lib/Support/system_error.cpp
parentf25faaaffbd9c6d3ffeccb333d0338e5bcb796b1 (diff)
downloadbcm5719-llvm-7b6fef82d43a4e121a284ebabf5de94c3485b29a.tar.gz
bcm5719-llvm-7b6fef82d43a4e121a284ebabf5de94c3485b29a.zip
Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
llvm-svn: 121379
Diffstat (limited to 'llvm/lib/Support/system_error.cpp')
-rw-r--r--llvm/lib/Support/system_error.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Support/system_error.cpp b/llvm/lib/Support/system_error.cpp
index cd18906f067..56898de3152 100644
--- a/llvm/lib/Support/system_error.cpp
+++ b/llvm/lib/Support/system_error.cpp
@@ -96,6 +96,15 @@ system_category() {
return s;
}
+const error_category&
+posix_category() {
+#ifdef LLVM_ON_WIN32
+ return generic_category();
+#else
+ return system_category();
+#endif
+}
+
// error_condition
std::string
OpenPOWER on IntegriCloud