36 |
#include <map> |
#include <map> |
37 |
#include <time.h> |
#include <time.h> |
38 |
#include <stdarg.h> |
#include <stdarg.h> |
39 |
|
#include <assert.h> |
40 |
|
|
41 |
#ifndef __has_extension |
#ifndef __has_extension |
42 |
# define __has_extension(x) 0 |
# define __has_extension(x) 0 |
412 |
if (type == typeid(uint32_t)) return DataType(T_isPointer, sz, "uint32"); |
if (type == typeid(uint32_t)) return DataType(T_isPointer, sz, "uint32"); |
413 |
if (type == typeid(int64_t)) return DataType(T_isPointer, sz, "int64"); |
if (type == typeid(int64_t)) return DataType(T_isPointer, sz, "int64"); |
414 |
if (type == typeid(uint64_t)) return DataType(T_isPointer, sz, "uint64"); |
if (type == typeid(uint64_t)) return DataType(T_isPointer, sz, "uint64"); |
415 |
|
if (type == typeid(size_t)) { |
416 |
|
if (sz == 1) return DataType(T_isPointer, sz, "uint8"); |
417 |
|
if (sz == 2) return DataType(T_isPointer, sz, "uint16"); |
418 |
|
if (sz == 4) return DataType(T_isPointer, sz, "uint32"); |
419 |
|
if (sz == 8) return DataType(T_isPointer, sz, "uint64"); |
420 |
|
else assert(false /* unknown size_t size */); |
421 |
|
} |
422 |
|
if (type == typeid(ssize_t)) { |
423 |
|
if (sz == 1) return DataType(T_isPointer, sz, "int8"); |
424 |
|
if (sz == 2) return DataType(T_isPointer, sz, "int16"); |
425 |
|
if (sz == 4) return DataType(T_isPointer, sz, "int32"); |
426 |
|
if (sz == 8) return DataType(T_isPointer, sz, "int64"); |
427 |
|
else assert(false /* unknown ssize_t size */); |
428 |
|
} |
429 |
if (type == typeid(bool)) return DataType(T_isPointer, sz, "bool"); |
if (type == typeid(bool)) return DataType(T_isPointer, sz, "bool"); |
430 |
if (type == typeid(float)) return DataType(T_isPointer, sz, "real32"); |
if (type == typeid(float)) return DataType(T_isPointer, sz, "real32"); |
431 |
if (type == typeid(double)) return DataType(T_isPointer, sz, "real64"); |
if (type == typeid(double)) return DataType(T_isPointer, sz, "real64"); |