fix(clang): remove an error reported by clang

This commit is contained in:
rudy
2021-12-07 16:34:24 +01:00
committed by Quentin Bourgerie
parent 4618abcc50
commit 74d52cb649

View File

@@ -368,12 +368,12 @@ CompilerEngine::Library::addCompilation(CompilationResult &compilation) {
auto objectPath = sourceName + OBJECT_EXT;
auto error = mlir::zamalang::emitObject(*module, objectPath);
if (!error) {
addExtraObjectFilePath(objectPath);
return objectPath;
if (error) {
return std::move(error);
}
return error;
addExtraObjectFilePath(objectPath);
return objectPath;
}
bool stringEndsWith(std::string path, std::string requiredExt) {