diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Object/ELF.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/ErrorOr.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/FileSystem.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/system_error.h | 4 |
4 files changed, 3 insertions, 7 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index ee97d4e05d..cb3a32a609 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -744,7 +744,7 @@ ELFFile<ELFT>::ELFFile(MemoryBuffer *Object, error_code &ec) } } - ec = error_code::success(); + ec = error_code(); } // Get the symbol table index in the symtab section given a symbol 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) {} |