fix(compiler): fix code generated for library header.

This commit is contained in:
Antoniu Pop
2022-02-27 23:36:14 +00:00
committed by Antoniu Pop
parent ebb719cf60
commit 8ee456315e

View File

@@ -542,9 +542,11 @@ llvm::Expected<std::string> CompilerEngine::Library::emitCppHeader() {
out << " static const std::string name = \"" << params.functionName
<< "\";\n";
out << "\n";
out << " static outcome::checked<extract_t, StringError>\n";
out << " static outcome::checked<" << params.functionName
<< "_t, StringError>\n";
out << " load(std::string outputLib)\n";
out << " { return extract_t::load(name, outputLib); }\n";
out << " { return " << params.functionName
<< "_t::load(name, outputLib); }\n";
out << "} // namespace " << params.functionName << "\n";
}
out << "\n";