diff options
Diffstat (limited to 'src/Common/src/TypeSystem/CodeGen/TypeDesc.CodeGen.cs')
-rw-r--r-- | src/Common/src/TypeSystem/CodeGen/TypeDesc.CodeGen.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Common/src/TypeSystem/CodeGen/TypeDesc.CodeGen.cs b/src/Common/src/TypeSystem/CodeGen/TypeDesc.CodeGen.cs new file mode 100644 index 000000000..9a5a1c8b2 --- /dev/null +++ b/src/Common/src/TypeSystem/CodeGen/TypeDesc.CodeGen.cs @@ -0,0 +1,30 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Internal.TypeSystem +{ + partial class TypeDesc + { + /// <summary> + /// Gets a value indicating whether this is a type that needs to be treated + /// specially. + /// </summary> + public bool IsIntrinsic + { + get + { + return (GetTypeFlags(TypeFlags.IsIntrinsic | TypeFlags.AttributeCacheComputed) & TypeFlags.IsIntrinsic) != 0; + } + } + } + + partial class InstantiatedType + { + partial void AddComputedIntrinsicFlag(ref TypeFlags flags) + { + if (_typeDef.IsIntrinsic) + flags |= TypeFlags.IsIntrinsic; + } + } +} |