Fixed TypeHasAttrData(), GetSignedType() and GetUnsignedType(), none in use yet though.
This commit is contained in:
@@ -63,6 +63,8 @@
|
|||||||
const Type type_char[] = { TYPE(T_CHAR), TYPE(T_END) };
|
const Type type_char[] = { TYPE(T_CHAR), TYPE(T_END) };
|
||||||
const Type type_schar[] = { TYPE(T_SCHAR), TYPE(T_END) };
|
const Type type_schar[] = { TYPE(T_SCHAR), TYPE(T_END) };
|
||||||
const Type type_uchar[] = { TYPE(T_UCHAR), TYPE(T_END) };
|
const Type type_uchar[] = { TYPE(T_UCHAR), TYPE(T_END) };
|
||||||
|
const Type type_short[] = { TYPE(T_SHORT), TYPE(T_END) };
|
||||||
|
const Type type_ushort[] = { TYPE(T_USHORT), TYPE(T_END) };
|
||||||
const Type type_int[] = { TYPE(T_INT), TYPE(T_END) };
|
const Type type_int[] = { TYPE(T_INT), TYPE(T_END) };
|
||||||
const Type type_uint[] = { TYPE(T_UINT), TYPE(T_END) };
|
const Type type_uint[] = { TYPE(T_UINT), TYPE(T_END) };
|
||||||
const Type type_long[] = { TYPE(T_LONG), TYPE(T_END) };
|
const Type type_long[] = { TYPE(T_LONG), TYPE(T_END) };
|
||||||
@@ -727,8 +729,10 @@ const Type* GetSignedType (const Type* T)
|
|||||||
case T_RANK_CHAR:
|
case T_RANK_CHAR:
|
||||||
return type_schar;
|
return type_schar;
|
||||||
|
|
||||||
case T_RANK_INT:
|
|
||||||
case T_RANK_SHORT:
|
case T_RANK_SHORT:
|
||||||
|
return type_short;
|
||||||
|
|
||||||
|
case T_RANK_INT:
|
||||||
return type_int;
|
return type_int;
|
||||||
|
|
||||||
case T_RANK_LONG:
|
case T_RANK_LONG:
|
||||||
@@ -749,8 +753,10 @@ const Type* GetUnsignedType (const Type* T)
|
|||||||
case T_RANK_CHAR:
|
case T_RANK_CHAR:
|
||||||
return type_uchar;
|
return type_uchar;
|
||||||
|
|
||||||
case T_RANK_INT:
|
|
||||||
case T_RANK_SHORT:
|
case T_RANK_SHORT:
|
||||||
|
return type_ushort;
|
||||||
|
|
||||||
|
case T_RANK_INT:
|
||||||
return type_uint;
|
return type_uint;
|
||||||
|
|
||||||
case T_RANK_LONG:
|
case T_RANK_LONG:
|
||||||
@@ -979,7 +985,11 @@ int HasUnknownSize (const Type* T)
|
|||||||
int TypeHasAttrData (const Type* T)
|
int TypeHasAttrData (const Type* T)
|
||||||
/* Return true if the given type has attribute data */
|
/* Return true if the given type has attribute data */
|
||||||
{
|
{
|
||||||
return IsClassStruct (T) || IsTypeArray (T) || IsClassFunc (T);
|
return IsClassStruct (T) ||
|
||||||
|
IsTypeArray (T) ||
|
||||||
|
IsClassFunc (T) ||
|
||||||
|
IsTypeVoid (T) ||
|
||||||
|
IsTypeBitField (T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -215,6 +215,8 @@ struct Type {
|
|||||||
extern const Type type_char[];
|
extern const Type type_char[];
|
||||||
extern const Type type_schar[];
|
extern const Type type_schar[];
|
||||||
extern const Type type_uchar[];
|
extern const Type type_uchar[];
|
||||||
|
extern const Type type_short[];
|
||||||
|
extern const Type type_ushort[];
|
||||||
extern const Type type_int[];
|
extern const Type type_int[];
|
||||||
extern const Type type_uint[];
|
extern const Type type_uint[];
|
||||||
extern const Type type_long[];
|
extern const Type type_long[];
|
||||||
|
|||||||
Reference in New Issue
Block a user