[PATCH] D103465: [OpaquePtr] Track pointee types in Clang

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 7 15:04:47 PDT 2021


nikic added a comment.

Maybe send a mail to cfe-dev to solicit some help with the opaque pointer migration on the clang side?



================
Comment at: clang/lib/CodeGen/Address.h:29-30
 public:
   Address(llvm::Value *pointer, CharUnits alignment)
-      : Pointer(pointer), Alignment(alignment) {
+      : Address(pointer, nullptr, alignment) {}
+  Address(llvm::Value *pointer, llvm::Type *PointeeType, CharUnits alignment)
----------------
dblaikie wrote:
> At some point will this include an assertion that 'pointer' isn't a PointerType? I guess some uses of PointerTyped values won't need to know their pointee type?
> 
> (or are all values in Address PointerTyped? (owing to them being "addresses"))?
Based on the unconditional cast in getType(), I'd assume that addresses are always pointer typed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103465



More information about the cfe-commits mailing list