tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:18313 // of its member: n*alignof(t)." - return MakeLdgLdu(Intrinsic::nvvm_ldg_global_i); - case NVPTX::BI__nvvm_ldg_h: - case NVPTX::BI__nvvm_ldg_h2: - if (!HasHalfSupport(BuiltinID)) { - CGM.Error(E->getExprLoc(), - getContext().BuiltinInfo.getName(BuiltinID).str() + - " requires native half type support."); - return nullptr; - } - [[fallthrough]]; + return MakeLdgLdu(Intrinsic::nvvm_ldg_global_i, *this, E); case NVPTX::BI__nvvm_ldg_f: ---------------- This is where lambda would have some advantage as we could capture what it needs without having to pass 'this' or 'E' explicitly. In this case it's not too bad, so I'm fine either way, with a very slight bias towards lambdas. The static functions just don't seem to buy us anything here, IMO. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146715/new/ https://reviews.llvm.org/D146715 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits