Skip to content

Commit f4d2751

Browse files
svenvhvmaksimo
authored andcommitted
Move enum lists to top of script
1 parent a0e0712 commit f4d2751

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

llvm-spirv/tools/spirv-tool/gen_spirv.bash

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
# header file spirv.hpp.
44
#
55

6+
# The NameMaps that will be generated into SPIRVNameMapEnum.h
7+
nameMapEnums="LinkageType Decoration BuiltIn Capability"
8+
9+
# The isValid functions that will be generated into SPIRVIsValidEnum.h
10+
isValidEnums="ExecutionModel AddressingModel MemoryModel StorageClass \
11+
LinkageType AccessQualifier FunctionParameterAttribute BuiltIn"
12+
13+
# The isValidxxxMask functions that will be generated into SPIRVIsValidEnum.h
14+
isValidMaskEnums="FunctionControlMask"
15+
616

717
######################
818
#
@@ -82,16 +92,15 @@ echo "
8292
gen() {
8393
type=$1
8494
if [[ "$type" == NameMap ]]; then
85-
for prefix in LinkageType Decoration BuiltIn Capability; do
86-
genNameMap $prefix
95+
for prefix in ${nameMapEnums} ; do
96+
genNameMap "$prefix"
8797
done
8898
elif [[ "$type" == isValid ]]; then
89-
for prefix in ExecutionModel AddressingModel MemoryModel StorageClass \
90-
LinkageType AccessQualifier FunctionParameterAttribute BuiltIn ; do
91-
genIsValid $prefix
99+
for prefix in ${isValidEnums} ; do
100+
genIsValid "$prefix"
92101
done
93-
for prefix in FunctionControlMask ; do
94-
genMaskIsValid $prefix
102+
for prefix in ${isValidMaskEnums} ; do
103+
genMaskIsValid "$prefix"
95104
done
96105
else
97106
echo "invalid type \"$type\"."

0 commit comments

Comments
 (0)