File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1856,6 +1856,9 @@ typedef enum SpvOp_ {
1856
1856
} SpvOp ;
1857
1857
1858
1858
#ifdef SPV_ENABLE_UTILITY_CODE
1859
+ #ifndef __cplusplus
1860
+ #include <stdbool.h>
1861
+ #endif
1859
1862
inline void SpvHasResultAndType (SpvOp opcode , bool * hasResult , bool * hasResultType ) {
1860
1863
* hasResult = * hasResultType = false;
1861
1864
switch (opcode ) {
Original file line number Diff line number Diff line change @@ -1852,6 +1852,9 @@ enum Op {
1852
1852
};
1853
1853
1854
1854
#ifdef SPV_ENABLE_UTILITY_CODE
1855
+ #ifndef __cplusplus
1856
+ #include < stdbool.h>
1857
+ #endif
1855
1858
inline void HasResultAndType (Op opcode, bool *hasResult, bool *hasResultType) {
1856
1859
*hasResult = *hasResultType = false ;
1857
1860
switch (opcode) {
Original file line number Diff line number Diff line change @@ -1852,6 +1852,9 @@ enum class Op : unsigned {
1852
1852
};
1853
1853
1854
1854
#ifdef SPV_ENABLE_UTILITY_CODE
1855
+ #ifndef __cplusplus
1856
+ #include <stdbool.h>
1857
+ #endif
1855
1858
inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
1856
1859
*hasResult = *hasResultType = false;
1857
1860
switch (opcode) {
Original file line number Diff line number Diff line change @@ -513,6 +513,9 @@ namespace {
513
513
}
514
514
515
515
out << " #ifdef SPV_ENABLE_UTILITY_CODE" << std::endl;
516
+ out << " #ifndef __cplusplus" << std::endl;
517
+ out << " #include <stdbool.h>" << std::endl;
518
+ out << " #endif" << std::endl;
516
519
out << " inline void " << pre () << " HasResultAndType(" << pre () << opName << " opcode, bool *hasResult, bool *hasResultType) {" << std::endl;
517
520
out << " *hasResult = *hasResultType = false;" << std::endl;
518
521
out << " switch (opcode) {" << std::endl;
You can’t perform that action at this time.
0 commit comments