Skip to content

Commit 0f677c2

Browse files
committed
Fix compilation errors
1 parent d2fddd8 commit 0f677c2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

clang/lib/CodeGen/CodeGenTypes.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)