yaxunl added inline comments.
================ Comment at: lib/CodeGen/TargetInfo.cpp:7291 + Address adjustAddrSpaceForAutoVar(Address A, const VarDecl *VD, + CodeGen::CodeGenFunction &CGF) const override; }; ---------------- rjmccall wrote: > How about, instead of introducing a second method, we just change > performAddrSpaceCast to take two AST address spaces and a flag indicating > whether the address is known to be non-null? Does your target have an > AST-level address space for the stack? In both AST and LLVM, the destination pointee type of address space cast may be different from the source pointee type (e.g. `addrspacecast i32 addrspace(1)* %a to i8 addrspace(4)*` is valid LLVM instruction), so performAddrSpaceCast needs to know the destination QualType, not just the address space. https://reviews.llvm.org/D32248 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits