Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Headers.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProkop Randáček <prokop@randacek.dev>2022-01-04 14:33:05 +0300
committerGitHub <noreply@github.com>2022-01-04 14:33:05 +0300
commit6e7a6754b1591e28fb85c1dbd0cfde2e05866501 (patch)
treecea5d796bd1332e681651bfe140ac03df8cf2f14
parenteddd4dfc930f1374a70797460240a501c7d333f7 (diff)
Include bool type for C
-rw-r--r--tools/buildHeaders/header.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp
index febc6f2..f2f16b3 100644
--- a/tools/buildHeaders/header.cpp
+++ b/tools/buildHeaders/header.cpp
@@ -513,6 +513,9 @@ namespace {
}
out << "#ifdef SPV_ENABLE_UTILITY_CODE" << std::endl;
+ out << "#ifndef __cplusplus" << std::endl;
+ out << "#include <stdbool.h>" << std::endl;
+ out << "#endif" << std::endl;
out << "inline void " << pre() << "HasResultAndType(" << pre() << opName << " opcode, bool *hasResult, bool *hasResultType) {" << std::endl;
out << " *hasResult = *hasResultType = false;" << std::endl;
out << " switch (opcode) {" << std::endl;