summaryrefslogtreecommitdiff
path: root/src/ToolBox/superpmi/superpmi-shared/typeutils.h
blob: 31cb47802040ad6e82566afe68b4f7dc190cf2f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//

//----------------------------------------------------------
// TypeUtils.h - Utility code for working with managed types
//----------------------------------------------------------
#ifndef _TypeUtils
#define _TypeUtils

#include "methodcontext.h"

class TypeUtils
{
public:
    static const char *GetCorInfoTypeName(CorInfoType type);
    static bool IsFloatingPoint(CorInfoType type);
    static bool IsPointer(CorInfoType type);
    static bool IsValueClass(CorInfoType type);
    static bool ValueClassRequiresByref(MethodContext *mc, CORINFO_CLASS_HANDLE clsHnd);
    static size_t SizeOfCorInfoType(CorInfoType type);
};

#endif