public static int getMetatype(DataType tp) {
		if (tp instanceof TypeDef) {
			tp = ((TypeDef) tp).getBaseDataType();
		}
		if (tp instanceof Undefined) {
			return TYPE_UNKNOWN;
		}
		if (tp instanceof AbstractFloatDataType) {
			return TYPE_FLOAT;
		}
		if (tp instanceof Pointer) {
			return TYPE_PTR;
		}
		if (tp instanceof BooleanDataType) {
			return TYPE_BOOL;
		}
		if (tp instanceof AbstractSignedIntegerDataType) {
			return TYPE_INT;
		}
		if (tp instanceof AbstractUnsignedIntegerDataType) {
			return TYPE_UINT;
		}
		if (tp instanceof Structure) {
			return TYPE_STRUCT;
		}
		if (tp instanceof Union) {
			return TYPE_UNION;
		}
		if (tp instanceof Array) {
			return TYPE_ARRAY;
		}
		if (tp instanceof CharDataType) {
			return ((CharDataType) tp).isSigned() ? TYPE_INT : TYPE_UINT;
		}
		if (tp instanceof WideCharDataType || tp instanceof WideChar16DataType ||
			tp instanceof WideChar32DataType) {
			return TYPE_INT;
		}
		if (tp instanceof Enum) {
			return ((Enum) tp).isSigned() ? TYPE_INT : TYPE_UINT;
		}
		if (tp instanceof FunctionDefinition) {
			return TYPE_CODE;
		}
		return TYPE_UNKNOWN;
	}
Get the decompiler meta-type associated with a data-type.
@param tp is the data-type
@return the meta-type
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeDataTypeManager.java