summaryrefslogtreecommitdiff
path: root/include/llvm/Support/system_error.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/system_error.h')
-rw-r--r--include/llvm/Support/system_error.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/llvm/Support/system_error.h b/include/llvm/Support/system_error.h
index 9d300fb991..8b3d9cc0c7 100644
--- a/include/llvm/Support/system_error.h
+++ b/include/llvm/Support/system_error.h
@@ -753,11 +753,8 @@ public:
std::string message() const;
- typedef void (*unspecified_bool_type)();
- static void unspecified_bool_true() {}
-
- operator unspecified_bool_type() const { // true if error
- return _val_ == 0 ? nullptr : unspecified_bool_true;
+ LLVM_EXPLICIT operator bool() const {
+ return _val_ != 0;
}
};