File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -488,14 +488,14 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
488488 return Ty;
489489 }
490490 }
491- // An incomplete array AST type is typically lowered to an array of length zero in LLVM IR.
492- // For SYCL devices, this is incompatible with SPIRV which does not accept arrays of length zero
493- // so we explicitly intercept this case to instead lower to an array of length 1 instead.
494- if (Context. getLangOpts (). SYCLIsDevice )
495- if (T-> isIncompleteArrayType ()) {
496- return llvm::ArrayType::get ( ConvertType (cast<ArrayType>(T)-> getElementType ()), 1 );
497- }
498- }
491+ // An incomplete array AST type is typically lowered to an array of length
492+ // zero in LLVM IR. For SYCL devices, this is incompatible with SPIRV which
493+ // does not accept arrays of length zero so we explicitly intercept this case
494+ // to instead lower to an array of length 1 instead.
495+ if (Context. getLangOpts (). SYCLIsDevice )
496+ if (T-> isIncompleteArrayType ())
497+ return llvm::ArrayType::get (
498+ ConvertType (cast<ArrayType>(T)-> getElementType ()), 1 );
499499
500500 // RecordTypes are cached and processed specially.
501501 if (const RecordType *RT = dyn_cast<RecordType>(Ty))
You can’t perform that action at this time.
0 commit comments