summaryrefslogtreecommitdiff
path: root/BCT/BytecodeTranslator/TranslationHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'BCT/BytecodeTranslator/TranslationHelper.cs')
-rw-r--r--BCT/BytecodeTranslator/TranslationHelper.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/BCT/BytecodeTranslator/TranslationHelper.cs b/BCT/BytecodeTranslator/TranslationHelper.cs
index 54ed1700..fde776f9 100644
--- a/BCT/BytecodeTranslator/TranslationHelper.cs
+++ b/BCT/BytecodeTranslator/TranslationHelper.cs
@@ -122,6 +122,10 @@ namespace BytecodeTranslator {
return s;
}
+ public static bool IsStruct(ITypeReference typ) {
+ return typ.IsValueType && !typ.IsEnum && typ.TypeCode == PrimitiveTypeCode.NotPrimitive;
+ }
+
#region Temp Stuff that must be replaced as soon as there is real code to deal with this
public static Bpl.Variable TempThisVar() {