================ @@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { if (d.hasExternalStorage()) return; - if (d.getStorageDuration() != SD_Automatic) - cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration"); + if (d.getStorageDuration() != SD_Automatic) { + // Static sampler variables translated to function calls. + if (d.getType()->isSamplerT()) { + // Nothing needs to be done here, but let's flag it as an error until we + // have a test. It requires OpenCL support. + cgm.errorNYI(d.getSourceRange(), "emitVarDecl static sampler type"); + return; + } + + cir::GlobalLinkageKind linkage = + cgm.getCIRLinkageVarDefinition(&d, /*IsConstant=*/false); + + // FIXME: We need to force the emission/use of a guard variable for ---------------- andykaylor wrote:
This is carried over from classic codegen. https://github.com/llvm/llvm-project/pull/143980 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits