diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h index 68ab94609c1..4d9f05bc09e 100644 --- a/include/llvm/Support/ErrorOr.h +++ b/include/llvm/Support/ErrorOr.h @@ -173,7 +173,7 @@ public: } reference get() { return *getStorage(); } - const_reference get() const { return const_cast >(this)->get(); } + const_reference get() const { return const_cast *>(this)->get(); } std::error_code getError() const { return HasError ? *getErrorStorage() : std::error_code();