[PATCH] D76259: Use more LLVM_ENABLE_ABI_BREAKING_CHECKS in Error.h
Aaron Puchert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 11 12:47:31 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb96b9335aea5: Use more LLVM_ENABLE_ABI_BREAKING_CHECKS in Error.h (authored by aaronpuchert).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76259/new/
https://reviews.llvm.org/D76259
Files:
llvm/include/llvm/Support/Error.h
Index: llvm/include/llvm/Support/Error.h
===================================================================
--- llvm/include/llvm/Support/Error.h
+++ llvm/include/llvm/Support/Error.h
@@ -269,9 +269,13 @@
}
ErrorInfoBase *getPtr() const {
+#if LLVM_ENABLE_ABI_BREAKING_CHECKS
return reinterpret_cast<ErrorInfoBase*>(
reinterpret_cast<uintptr_t>(Payload) &
~static_cast<uintptr_t>(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<ErrorInfoBase*>(
(reinterpret_cast<uintptr_t>(Payload) &
~static_cast<uintptr_t>(0x1)) |
(V ? 0 : 1));
+#endif
}
std::unique_ptr<ErrorInfoBase> takePayload() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76259.256795.patch
Type: text/x-patch
Size: 858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200411/d56e7ded/attachment.bin>
More information about the llvm-commits
mailing list