[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 25 12:06:08 PDT 2025
================
@@ -923,4 +923,129 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType *origArrayType,
return builder.getConstInt(*currSrcLoc, SizeTy, countFromCLAs);
}
+// TODO(cir): most part of this function can be shared between CIRGen
+// and traditional LLVM codegen
+void CIRGenFunction::emitVariablyModifiedType(QualType type) {
+ assert(type->isVariablyModifiedType() &&
+ "Must pass variably modified type to EmitVLASizes!");
+
+ // We're going to walk down into the type and look for VLA
+ // expressions.
+ do {
+ assert(type->isVariablyModifiedType());
+
+ const Type *ty = type.getTypePtr();
+ switch (ty->getTypeClass()) {
+ case Type::CountAttributed:
+ case Type::PackIndexing:
+ case Type::ArrayParameter:
+ case Type::HLSLAttributedResource:
+ case Type::HLSLInlineSpirv:
+ case Type::PredefinedSugar:
+ llvm_unreachable("NYI");
----------------
andykaylor wrote:
Use `cgm.errorNYI` here.
https://github.com/llvm/llvm-project/pull/150668
More information about the cfe-commits
mailing list