only 8 and 32 bit integers were supported before.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
**************************************************************************/
#include <stdio.h>
+#include <inttypes.h>
#include "util/u_debug.h"
#include "util/u_memory.h"
type_fmt[4] = 'g';
type_fmt[5] = '\0';
} else if (type_kind == LLVMIntegerTypeKind) {
- if (LLVMGetIntTypeWidth(type_ref) == 8) {
+ if (LLVMGetIntTypeWidth(type_ref) == 64) {
+ unsigned flen = strlen(PRId64);
+ assert(flen <= 3);
+ strncpy(type_fmt + 2, PRId64, flen);
+ } else if (LLVMGetIntTypeWidth(type_ref) == 8) {
type_fmt[2] = 'u';
} else {
type_fmt[2] = 'i';