mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
Implement jit_compiler::check
Instead of checking file existence (because file may be damaged).
This commit is contained in:
parent
7939160178
commit
91d80aa7b9
3 changed files with 17 additions and 1 deletions
|
@ -1200,6 +1200,19 @@ void jit_compiler::add(const std::string& path)
|
|||
}
|
||||
}
|
||||
|
||||
bool jit_compiler::check(const std::string& path)
|
||||
{
|
||||
if (auto cache = ObjectCache::load(path))
|
||||
{
|
||||
if (auto object_file = llvm::object::ObjectFile::createObjectFile(*cache))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void jit_compiler::fin()
|
||||
{
|
||||
m_engine->finalizeObject();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue