================
@@ -1221,3 +1254,172 @@ IntPointer IntPointer::baseCast(const interp::Context
&Ctx,
std::nullopt, RD, false);
return {T.getTypePtr(), Value + BaseLayoutOffset.getQuantity()};
}
+
+std::optional<size_t>
+OpaquePointer::computeLayoutOffset(const ASTContext &ASTCtx) const {
----------------
tbaederr wrote:
There is `Pointer::computeOffsetForComparison` where I _tried_ to simply return
an abstract number that could be used to compare two pointers, but it didn't
work out in most cases. And we still need the full offset value from the
`ASTRecordLayout` when subtracting two pointers.
https://github.com/llvm/llvm-project/pull/213017
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits