================
@@ -2209,6 +2209,18 @@ void CodeGenFunction::EmitStoreOfScalar(llvm::Value 
*Value, Address Addr,
     }
   }
 
+  // When storing a pointer, perform address space cast if needed.
----------------
efriedma-quic wrote:

Types in IRGen should match types in the AST.  So if an lvalue is in 
address-space zero, the generated code for the "LValue" should be in 
address-space zero.  If the "&" operator in the AST returns a pointer in 
address-space zero, then codegen for that operator should also be in 
address-space zero.  By the time we get to EmitScalarInit, it's way too late to 
try to fix the type.

https://github.com/llvm/llvm-project/pull/154380
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to