From e8e79aa312e88eead57f13d9554e441e3b028489 Mon Sep 17 00:00:00 2001 From: "joaquin.f.fernandez" Date: Fri, 3 Jan 2025 11:54:41 -0300 Subject: [PATCH] Add include for external functions. --- src/mmoc/generator/generator.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);