forked from OSchip/llvm-project
Revert CPU detection code to return "generic" instead of an empty string in case
of failure. The x86 target didn't like empty cpu names and broke x86 tests on non-x86 buildbots. llvm-svn: 89111
This commit is contained in:
parent
60f4854c76
commit
713fd3564a
|
@ -1154,7 +1154,7 @@ public:
|
|||
OS << " with assertions";
|
||||
#endif
|
||||
std::string CPU = sys::getHostCPUName();
|
||||
if (CPU.empty()) CPU = "(unknown)";
|
||||
if (CPU == "generic") CPU = "(unknown)";
|
||||
OS << ".\n"
|
||||
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
|
||||
<< " Host: " << sys::getHostTriple() << '\n'
|
||||
|
|
|
@ -249,7 +249,7 @@ std::string sys::getHostCPUName() {
|
|||
}
|
||||
|
||||
default:
|
||||
return "";
|
||||
return "generic";
|
||||
}
|
||||
} else if (memcmp(text.c, "AuthenticAMD", 12) == 0) {
|
||||
// FIXME: this poorly matches the generated SubtargetFeatureKV table. There
|
||||
|
@ -289,10 +289,10 @@ std::string sys::getHostCPUName() {
|
|||
case 16:
|
||||
return "amdfam10";
|
||||
default:
|
||||
return "";
|
||||
return "generic";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return "";
|
||||
return "generic";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue