================
@@ -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 {
----------------
ojhunt wrote:
I just had a dream of a faster access path in the interpreter, ah well :(
I wish there was some direct way to verify compatible layout, oh well.
Can bitfields effect this? you can't in principle get the offset of a bit field
but I don't know if it's possible to construct a code path that could reach
here in such a position. In principle I would expect sema to have already
rejected that before evaluation happens.
https://github.com/llvm/llvm-project/pull/213017
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits