Skip to content

Commit 6e7a675

Browse files
author
Prokop Randáček
authored
Include bool type for C
1 parent eddd4df commit 6e7a675

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/buildHeaders/header.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,9 @@ namespace {
513513
}
514514

515515
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;
516519
out << "inline void " << pre() << "HasResultAndType(" << pre() << opName << " opcode, bool *hasResult, bool *hasResultType) {" << std::endl;
517520
out << " *hasResult = *hasResultType = false;" << std::endl;
518521
out << " switch (opcode) {" << std::endl;

0 commit comments

Comments
 (0)