================
@@ -177,7 +172,7 @@ mlir::TypedAttr LowerItaniumCXXABI::lowerDataMemberConstant(
   if (attr.isNullPtr()) {
     // Itanium C++ ABI 2.3:
     //   A NULL pointer is represented as -1.
-    memberOffset = -1ull;
+    memberOffset = std::numeric_limits<uint64_t>::max();
----------------
andykaylor wrote:

Here we should change the type of `memberOffset` to `int64_t`. As indicated by 
the comment in the else block, this is conceptually a `ptrdiff_t` value, but 
it's `ptrdiff_t` for an Itanium target, so I think it's safest to use `int64_t` 
directly rather than hoping the compiler's host `ptrdiff_t` aligns with that.

https://github.com/llvm/llvm-project/pull/178225
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to