1/*
2 * Copyright 2017, The Android Open Source Project
3 *
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
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#include "visitor.h"
18
19#include "instructions.h"
20#include "module.h"
21
22namespace android {
23namespace spirit {
24
25void DoNothingVisitor::visit(Entity *e) { e->accept(this); }
26
27void DoNothingVisitor::visit(Module *m) { m->accept(this); }
28
29void DoNothingVisitor::visit(EntryPointDefinition *entry) {
30  entry->accept(this);
31}
32
33void DoNothingVisitor::visit(DebugInfoSection *dinfo) { dinfo->accept(this); }
34
35void DoNothingVisitor::visit(AnnotationSection *a) { a->accept(this); }
36
37void DoNothingVisitor::visit(GlobalSection *g) { g->accept(this); }
38void DoNothingVisitor::visit(FunctionDeclaration *fdecl) {
39  fdecl->accept(this);
40}
41void DoNothingVisitor::visit(Block *b) { b->accept(this); }
42void DoNothingVisitor::visit(FunctionDefinition *fdef) { fdef->accept(this); }
43void DoNothingVisitor::visit(Instruction *inst) { inst->accept(this); }
44#define HANDLE_INSTRUCTION(OPCODE, INST_CLASS)                                 \
45  void DoNothingVisitor::visit(INST_CLASS *) {}
46#include "instruction_dispatches_generated.h"
47#undef HANDLE_INSTRUCTION
48
49} // namespace spirit
50} // namespace android
51