1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Class "llvm:StringRef" has no member 'Startswith' (#15898)

This commit is contained in:
Darkhost1999 2024-08-08 14:40:52 -05:00 committed by GitHub
parent 20598960a5
commit 3970b7b754
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -727,11 +727,11 @@ llvm::StringRef fallback_cpu_detection()
{
#if defined (ARCH_X64)
// If we got here we either have a very old and outdated CPU or a new CPU that has not been seen by LLVM yet.
llvm::StringRef brand = utils::get_cpu_brand();
const std::string brand = utils::get_cpu_brand();
const auto family = utils::get_cpu_family();
const auto model = utils::get_cpu_model();
if (brand.startswith("AMD"))
if (brand.starts_with("AMD"))
{
switch (family)
{
@ -759,7 +759,7 @@ llvm::StringRef fallback_cpu_detection()
: "znver3";
}
}
else if (brand.contains("Intel"))
else if (brand.find("Intel") != std::string::npos)
{
if (!utils::has_avx())
{
@ -779,7 +779,7 @@ llvm::StringRef fallback_cpu_detection()
}
return "icelake-client";
}
else if (brand.startswith("VirtualApple"))
else if (brand.starts_with("VirtualApple"))
{
// No AVX. This will change in MacOS 15+, at which point we may revise this.
return utils::has_avx() ? "haswell" : "nehalem";