efriedma added inline comments.
================ Comment at: clang/lib/CodeGen/CGVTables.cpp:836 + fnPtr = + llvm::ConstantExpr::getAddrSpaceCast(fnPtr, CGM.GlobalsInt8PtrTy); + return builder.add(fnPtr); ---------------- If I follow correctly, the fnPtr is guaranteed to be in the global address-space, but GetAddrOfFunction returns a generic pointer. So the vtable entries are in the global address-space for efficiency? Seems reasonable. There isn't really much point to explicitly checking `FnAS != GVAS` before the call to getAddrSpaceCast; getAddrSpaceCast does the same check internally. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits