2 * Copyright 2016 WebAssembly Community Group participants
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "wabt/binary.h"
21 BinarySectionOrder
GetSectionOrder(BinarySection sec
) {
23 #define V(Name, name, code) \
24 case BinarySection::Name: \
25 return BinarySectionOrder::Name;
26 WABT_FOREACH_BINARY_SECTION(V
)
33 const char* GetSectionName(BinarySection sec
) {
35 #define V(Name, name, code) \
36 case BinarySection::Name: \
38 WABT_FOREACH_BINARY_SECTION(V
)
46 const char* NameSubsectionName
[] = {
61 const char* GetNameSectionSubsectionName(NameSectionSubsection subsec
) {
62 static_assert(WABT_ENUM_COUNT(NameSectionSubsection
) ==
63 WABT_ARRAY_SIZE(NameSubsectionName
),
64 "Malformed ExprTypeName array");
65 return NameSubsectionName
[size_t(subsec
)];