iliya-diyachkov added inline comments.
================ Comment at: clang/lib/CodeGen/CGOpenCLRuntime.cpp:100-112 +llvm::Type *CGOpenCLRuntime::getSamplerType(const Type *T) { + if (!SamplerTy) { + if (llvm::Type *TransTy = CGM.getTargetCodeGenInfo().getOpenCLType( + CGM, CGM.getContext().OCLSamplerTy.getTypePtr())) + SamplerTy = TransTy; + else + SamplerTy = llvm::PointerType::get( ---------------- Perhaps use early exits like this, or even removing 'else' clause. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141008/new/ https://reviews.llvm.org/D141008 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits