Use std::string_view in cpu code
This commit is contained in:
@@ -551,9 +551,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
std::string jit_compiler::cpu(const std::string& _cpu)
|
||||
std::string jit_compiler::cpu(std::string_view _cpu)
|
||||
{
|
||||
std::string m_cpu = _cpu;
|
||||
std::string m_cpu = std::string(_cpu);
|
||||
|
||||
if (m_cpu.empty())
|
||||
{
|
||||
@@ -681,7 +681,7 @@ bool jit_compiler::add_sub_disk_space(ssz space)
|
||||
}).second;
|
||||
}
|
||||
|
||||
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, const std::string& _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
|
||||
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string_view _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
|
||||
: m_context(new llvm::LLVMContext)
|
||||
, m_cpu(cpu(_cpu))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user