• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
22 namespace android {
23 namespace spirit {
24 
visit(Entity * e)25 void DoNothingVisitor::visit(Entity *e) { e->accept(this); }
26 
visit(Module * m)27 void DoNothingVisitor::visit(Module *m) { m->accept(this); }
28 
visit(EntryPointDefinition * entry)29 void DoNothingVisitor::visit(EntryPointDefinition *entry) {
30   entry->accept(this);
31 }
32 
visit(DebugInfoSection * dinfo)33 void DoNothingVisitor::visit(DebugInfoSection *dinfo) { dinfo->accept(this); }
34 
visit(AnnotationSection * a)35 void DoNothingVisitor::visit(AnnotationSection *a) { a->accept(this); }
36 
visit(GlobalSection * g)37 void DoNothingVisitor::visit(GlobalSection *g) { g->accept(this); }
visit(FunctionDeclaration * fdecl)38 void DoNothingVisitor::visit(FunctionDeclaration *fdecl) {
39   fdecl->accept(this);
40 }
visit(Block * b)41 void DoNothingVisitor::visit(Block *b) { b->accept(this); }
visit(FunctionDefinition * fdef)42 void DoNothingVisitor::visit(FunctionDefinition *fdef) { fdef->accept(this); }
visit(Instruction * inst)43 void 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