From 8ee456315e7617534fefd8c18b8edcc70e3de203 Mon Sep 17 00:00:00 2001 From: Antoniu Pop Date: Sun, 27 Feb 2022 23:36:14 +0000 Subject: [PATCH] fix(compiler): fix code generated for library header. --- compiler/lib/Support/CompilerEngine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/lib/Support/CompilerEngine.cpp b/compiler/lib/Support/CompilerEngine.cpp index 32c926f23..c3ff2b323 100644 --- a/compiler/lib/Support/CompilerEngine.cpp +++ b/compiler/lib/Support/CompilerEngine.cpp @@ -542,9 +542,11 @@ llvm::Expected CompilerEngine::Library::emitCppHeader() { out << " static const std::string name = \"" << params.functionName << "\";\n"; out << "\n"; - out << " static outcome::checked\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";