Skip to content

Commit

Permalink
Add include for external functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Jan 3, 2025
1 parent 95bf502 commit e8e79aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mmoc/generator/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e8e79aa

Please sign in to comment.