SPU LLVM: Ensure programs are written to disk irregardless of failure

This commit is contained in:
Elad Ashkenazi 2024-06-06 19:52:49 +03:00
parent ac5d907002
commit 47fe955d35

View file

@ -2638,6 +2638,14 @@ public:
fs::file(m_spurt->get_cache_path() + "spu-ir.log", fs::write + fs::append).write(log);
}
if (auto& cache = g_fxo->get<spu_cache>())
{
if (add_to_file)
{
cache.add(func);
}
}
fmt::throw_exception("Compilation failed");
}