Skip to content

Commit 342613d

Browse files
[test][IRGen] Avoid redefinition of bool in huge_c_type.swift
musl and wasi-libc modules contains stdint.h and stdbool.h in their modulemap, and `#incnlude <stdint.h>` in huge_c_type.h leads including stdbool.h also in the scope. This results in conflicting the bool definition, so we should avoid the redefinition.
1 parent 8b40353 commit 342613d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/IRGen/Inputs/huge_c_type.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include <stdint.h>
22

3-
typedef uint8_t bool;
4-
53
#define CREATE_ARRAY(T, N) \
64
struct { \
75
T data[N]; \
@@ -15,7 +13,7 @@ typedef struct {
1513

1614
typedef struct {
1715
uint64_t a;
18-
bool b;
16+
uint8_t b;
1917
CREATE_ARRAY(Thing, 16) c;
2018
uint32_t d;
2119
uint64_t e;

0 commit comments

Comments
 (0)