[PATCH] D109003: Ensure field-annotations on pointers properly match the AS of the field.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 1 05:14:24 PDT 2021
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2408
llvm::Type *VTy = V->getType();
- llvm::Function *F = CGM.getIntrinsic(llvm::Intrinsic::ptr_annotation,
- CGM.Int8PtrTy);
+ llvm::PointerType *PTy = dyn_cast<llvm::PointerType>(VTy);
+ unsigned AS = PTy ? PTy->getAddressSpace() : 0;
----------------
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109003/new/
https://reviews.llvm.org/D109003
More information about the cfe-commits
mailing list