diff --git a/src/mmoc/generator/generator.cpp b/src/mmoc/generator/generator.cpp index 6ea25180..820668c9 100644 --- a/src/mmoc/generator/generator.cpp +++ b/src/mmoc/generator/generator.cpp @@ -85,9 +85,12 @@ int Generator::generate() generateIncludes(ffname); FunctionTable ft = model.calledFunctions(); FunctionTable::iterator it; + Util::SymbolTable includes; for (IR::Function f = ft.begin(it); !ft.end(it); f = ft.next(it)) { Function func(f, _flags, _writer); + func.addInclude(includes); func.definition(); + includes.merge(func.functionIncludes()); _fheader.push_back(func.header()); } calledFunctionHeader(ffname);