[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 27 14:34:06 PST 2023


ahatanak added inline comments.


================
Comment at: clang/lib/CodeGen/Address.h:146
+    return Address(NewPointer, getElementType(), getAlignment(),
+                   isKnownNonNull());
   }
----------------
This isn't safe. We cannot tell whether the new pointer is non-null or not based on whether it's currently non-null.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142584/new/

https://reviews.llvm.org/D142584



More information about the cfe-commits mailing list