Skip to content

Commit da6a6b4

Browse files
committed
[WIP] Get better at skipping stuff
1 parent 6a52894 commit da6a6b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator/TypeUtilities.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ public static bool IsStructure (this Type type)
4040
return type.IsValueType &&
4141
!type.IsEnum &&
4242
!type.IsPrimitive &&
43+
!type.IsArray &&
4344
type != typeof (decimal) &&
44-
type != typeof (DateTime);
45+
type != typeof (DateTime) &&
46+
type != typeof (object);
4547
}
4648

4749
public static bool IsIRStruct<T> (this StructureMemberInfo<T> smi)
@@ -51,6 +53,7 @@ public static bool IsIRStruct<T> (this StructureMemberInfo<T> smi)
5153
// type.IsStructure() handles checks for primitive types, enums etc
5254
return
5355
type != typeof(string) &&
56+
!smi.Info.IsInlineArray () &&
5457
!smi.Info.IsNativePointer () &&
5558
(type.IsStructure () || type.IsClass);
5659
}

0 commit comments

Comments
 (0)