mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-10 04:03:44 +02:00
Migrates lingering instances of the old logger over to fmt where applicable. This allows removing some of the old defines and functions. The only remaining usages of the printf-based variant of the logger is in Tests/LinuxSyscalls/Syscalls.cpp for the strace handling.
32 lines
772 B
C++
32 lines
772 B
C++
#include "IRLoader/Loader.h"
|
|
#include <FEXCore/Utils/LogManager.h>
|
|
|
|
#include <FEXCore/IR/IR.h>
|
|
#include <FEXCore/IR/IREmitter.h>
|
|
|
|
#include <fstream>
|
|
#include <stdio.h>
|
|
|
|
namespace FEX::IRLoader {
|
|
Loader::Loader(std::string const &Filename, std::string const &ConfigFilename) {
|
|
Config.Init(ConfigFilename);
|
|
std::fstream fp(Filename, std::fstream::binary | std::fstream::in);
|
|
|
|
if (!fp.is_open()) {
|
|
LogMan::Msg::EFmt("Couldn't open IR file '{}'", Filename);
|
|
return;
|
|
}
|
|
|
|
ParsedCode = FEXCore::IR::Parse(&fp);
|
|
|
|
if (ParsedCode) {
|
|
auto NewIR = ParsedCode->ViewIR();
|
|
EntryRIP = 0x40000;
|
|
|
|
std::stringstream out;
|
|
FEXCore::IR::Dump(&out, &NewIR, nullptr);
|
|
fmt::print("IR:\n{}\n@@@@@\n", out.str());
|
|
}
|
|
}
|
|
}
|