diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2014-06-13 19:43:18 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2014-06-13 19:43:18 +0000 |
| commit | bd37b6884c4f1547b418922e3d489145cf5677d7 (patch) | |
| tree | 906f0ce36e4e497d70156905d1ed1a3d0fdc7134 | |
| parent | cadbbe15375b20634854fa20c96f369754fa7456 (diff) | |
| download | bcm5719-llvm-bd37b6884c4f1547b418922e3d489145cf5677d7.tar.gz bcm5719-llvm-bd37b6884c4f1547b418922e3d489145cf5677d7.zip | |
Add intptr types
Based on clang's stdint.h
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 210933
| -rw-r--r-- | libclc/generic/include/clc/clctypes.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libclc/generic/include/clc/clctypes.h b/libclc/generic/include/clc/clctypes.h index ca729f76fd3..ca1372d0892 100644 --- a/libclc/generic/include/clc/clctypes.h +++ b/libclc/generic/include/clc/clctypes.h @@ -7,6 +7,18 @@ typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; +#define __stdint_join3(a,b,c) a ## b ## c + +#define __intn_t(n) __stdint_join3(__INT, n, _TYPE__) +#define __uintn_t(n) __stdint_join3(unsigned __INT, n, _TYPE__) + +typedef __intn_t(__INTPTR_WIDTH__) intptr_t; +typedef __uintn_t(__INTPTR_WIDTH__) uintptr_t; + +#undef __uintn_t +#undef __intn_t +#undef __stdint_join3 + /* 6.1.2 Built-in Vector Data Types */ typedef __attribute__((ext_vector_type(2))) char char2; |

