summaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/ErrorOr.h2
-rw-r--r--include/llvm/Support/FileSystem.h2
-rw-r--r--include/llvm/Support/system_error.h4
3 files changed, 2 insertions, 6 deletions
diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h
index becd95780e..625574b88b 100644
--- a/include/llvm/Support/ErrorOr.h
+++ b/include/llvm/Support/ErrorOr.h
@@ -163,7 +163,7 @@ public:
const_reference get() const { return const_cast<ErrorOr<T> >(this)->get(); }
error_code getError() const {
- return HasError ? *getErrorStorage() : error_code::success();
+ return HasError ? *getErrorStorage() : error_code();
}
pointer operator ->() {
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h
index 56897aa526..a9ed802921 100644
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -505,7 +505,7 @@ inline error_code file_size(const Twine &Path, uint64_t &Result) {
if (EC)
return EC;
Result = Status.getSize();
- return error_code::success();
+ return error_code();
}
/// @brief Set the file modification and access time.
diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h
index aa5e9f710a..a18b921ac1 100644
--- a/include/llvm/Support/system_error.h
+++ b/include/llvm/Support/system_error.h
@@ -727,10 +727,6 @@ class error_code {
public:
error_code() : _val_(0), _cat_(&system_category()) {}
- static error_code success() {
- return error_code();
- }
-
error_code(int _val, const error_category& _cat)
: _val_(_val), _cat_(&_cat) {}