File tree Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -35,25 +35,8 @@ bool CIRGenTypes::isFuncParamTypeConvertible(clang::QualType type) {
3535 if (!tagType)
3636 return true ;
3737
38- // Incomplete types cannot be converted.
39- if (tagType->isIncompleteType ())
40- return false ;
41-
42- // If this is an enum, then it is always safe to convert.
43- const RecordType *recordType = dyn_cast<RecordType>(tagType);
44- if (!recordType)
45- return true ;
46-
47- // Otherwise, we have to be careful. If it is a struct that we're in the
48- // process of expanding, then we can't convert the function type. That's ok
49- // though because we must be in a pointer context under the struct, so we can
50- // just convert it to a dummy type.
51- //
52- // We decide this by checking whether ConvertRecordDeclType returns us an
53- // opaque type for a struct that we know is defined.
54- // TODO(cir): struct types are not implemented yet, so skip the final check.
55- // return isSafeToConvert(recordType->getDecl(), *this);
56- return true ;
38+ // Function types involving incomplete class types are problematic in MLIR.
39+ return !tagType->isIncompleteType ();
5740}
5841
5942// / Code to verify a given function type is complete, i.e. the return type and
You can’t perform that action at this time.
0 commit comments