diff --git a/llvm/include/llvm/Support/Error.h b/llvm/include/llvm/Support/Error.h --- a/llvm/include/llvm/Support/Error.h +++ b/llvm/include/llvm/Support/Error.h @@ -269,9 +269,13 @@ } ErrorInfoBase *getPtr() const { +#if LLVM_ENABLE_ABI_BREAKING_CHECKS return reinterpret_cast( reinterpret_cast(Payload) & ~static_cast(0x1)); +#else + return Payload; +#endif } void setPtr(ErrorInfoBase *EI) { @@ -294,10 +298,12 @@ } void setChecked(bool V) { +#if LLVM_ENABLE_ABI_BREAKING_CHECKS Payload = reinterpret_cast( (reinterpret_cast(Payload) & ~static_cast(0x1)) | (V ? 0 : 1)); +#endif } std::unique_ptr takePayload() {