Skip to content

Commit 4e6107f

Browse files
committed
improve fix for test with custom stdint.h
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 86cde46 commit 4e6107f

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

clang/test/Headers/Inputs/include/stdint.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
#ifndef STDINT_H
22
#define STDINT_H
33

4+
#ifdef __INT8_TYPE__
5+
typedef __INT8_TYPE__ int8_t;
6+
#endif
7+
typedef unsigned char uint8_t;
8+
9+
#ifdef __INT16_TYPE__
10+
typedef __INT16_TYPE__ int16_t;
11+
typedef unsigned __INT16_TYPE__ uint16_t;
12+
#endif
13+
414
#ifdef __INT32_TYPE__
15+
typedef __INT32_TYPE__ int32_t;
516
typedef unsigned __INT32_TYPE__ uint32_t;
617
#endif
718

819
#ifdef __INT64_TYPE__
20+
typedef __INT64_TYPE__ int64_t;
921
typedef unsigned __INT64_TYPE__ uint64_t;
1022
#endif
1123

clang/test/Headers/ms-intrin.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,6 @@ typedef __SIZE_TYPE__ size_t;
3737
#include <intrin.h>
3838

3939
#ifdef __ARM_ACLE
40-
// arm_acle.h needs some stdint types, but -ffreestanding prevents us from
41-
// getting it from stddef.h. Work around it with these typedefs.
42-
#ifdef __INT8_TYPE__
43-
typedef __INT8_TYPE__ int8_t;
44-
#endif
45-
typedef unsigned char uint8_t;
46-
#ifdef __INT16_TYPE__
47-
typedef __INT16_TYPE__ int16_t;
48-
typedef unsigned __INT16_TYPE__ uint16_t;
49-
#endif
50-
#ifdef __INT32_TYPE__
51-
typedef __INT32_TYPE__ int32_t;
52-
typedef unsigned __INT32_TYPE__ uint32_t;
53-
#endif
54-
#ifdef __INT64_TYPE__
55-
typedef __INT64_TYPE__ int64_t;
56-
typedef unsigned __INT64_TYPE__ uint64_t;
57-
#endif
5840
#include <arm_acle.h>
5941
#endif
6042

0 commit comments

Comments
 (0)